From d83fe1f86a792aff0d42fb7adcaa76e2ad6394bc Mon Sep 17 00:00:00 2001 From: wawxxjm Date: Mon, 9 Dec 2019 18:49:24 -0500 Subject: [PATCH] added some tests --- youtube_dl/extractor/academicearth.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/academicearth.py b/youtube_dl/extractor/academicearth.py index 34095501c..73adc76aa 100644 --- a/youtube_dl/extractor/academicearth.py +++ b/youtube_dl/extractor/academicearth.py @@ -8,7 +8,7 @@ from .common import InfoExtractor class AcademicEarthCourseIE(InfoExtractor): _VALID_URL = r'^https?://(?:www\.)?academicearth\.org/playlists/(?P[^?#/]+)' IE_NAME = 'AcademicEarth:Course' - _TEST = { + _TESTS = [{ 'url': 'http://academicearth.org/playlists/laws-of-nature/', 'info_dict': { 'id': 'laws-of-nature', @@ -16,7 +16,23 @@ class AcademicEarthCourseIE(InfoExtractor): 'description': 'Introduce yourself to the laws of nature with these free online college lectures from Yale, Harvard, and MIT.', }, 'playlist_count': 3, - } + }, { + 'url': "https://academicearth.org/playlists/first-day-of-freshman-year/", + 'info_dict': { + 'id': 'first-day-of-freshman-year', + 'title': 'FIRST DAY OF FRESHMAN YEAR', + 'description': 'Relive the first day of your freshman year with a series of first lectures from introductory college courses at MIT, Yale, and Stanford.' + }, + 'playlist_count': 3, + }, { + 'url': 'https://academicearth.org/playlists/financial-crisis', + 'info_dict': { + 'id': 'financial-crisis', + 'title': 'UNDERSTANDING THE FINANCIAL CRISIS', + 'description': 'Expert perspectives on the Financial Crisis and how to manage it.' + }, + 'playlist_count': 7, + }] def _real_extract(self, url): playlist_id = self._match_id(url)