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:
parent
cf80ff186e
commit
d83fe1f86a
@ -8,7 +8,7 @@ from .common import InfoExtractor
|
|||||||
class AcademicEarthCourseIE(InfoExtractor):
|
class AcademicEarthCourseIE(InfoExtractor):
|
||||||
_VALID_URL = r'^https?://(?:www\.)?academicearth\.org/playlists/(?P<id>[^?#/]+)'
|
_VALID_URL = r'^https?://(?:www\.)?academicearth\.org/playlists/(?P<id>[^?#/]+)'
|
||||||
IE_NAME = 'AcademicEarth:Course'
|
IE_NAME = 'AcademicEarth:Course'
|
||||||
_TEST = {
|
_TESTS = [{
|
||||||
'url': 'http://academicearth.org/playlists/laws-of-nature/',
|
'url': 'http://academicearth.org/playlists/laws-of-nature/',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'laws-of-nature',
|
'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.',
|
'description': 'Introduce yourself to the laws of nature with these free online college lectures from Yale, Harvard, and MIT.',
|
||||||
},
|
},
|
||||||
'playlist_count': 3,
|
'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):
|
def _real_extract(self, url):
|
||||||
playlist_id = self._match_id(url)
|
playlist_id = self._match_id(url)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user