1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-09 21:17:16 +08:00

added some tests

This commit is contained in:
wawxxjm 2019-12-09 18:49:24 -05:00 committed by GitHub
parent cf80ff186e
commit d83fe1f86a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ from .common import InfoExtractor
class AcademicEarthCourseIE(InfoExtractor):
_VALID_URL = r'^https?://(?:www\.)?academicearth\.org/playlists/(?P<id>[^?#/]+)'
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)