3 from .common
import InfoExtractor
6 class AcademicEarthCourseIE(InfoExtractor
):
7 _VALID_URL
= r
'https?://(?:www\.)?academicearth\.org/playlists/(?P<id>[^?#/]+)'
8 IE_NAME
= 'AcademicEarth:Course'
10 'url': 'http://academicearth.org/playlists/laws-of-nature/',
12 'id': 'laws-of-nature',
13 'title': 'Laws of Nature',
14 'description': 'Introduce yourself to the laws of nature with these free online college lectures from Yale, Harvard, and MIT.',
19 def _real_extract(self
, url
):
20 playlist_id
= self
._match
_id
(url
)
22 webpage
= self
._download
_webpage
(url
, playlist_id
)
23 title
= self
._html
_search
_regex
(
24 r
'<h1 class="playlist-name"[^>]*?>(.*?)</h1>', webpage
, 'title')
25 description
= self
._html
_search
_regex
(
26 r
'<p class="excerpt"[^>]*?>(.*?)</p>',
27 webpage
, 'description', fatal
=False)
29 r
'<li class="lecture-preview">\s*?<a target="_blank" href="([^"]+)">',
31 entries
= [self
.url_result(u
) for u
in urls
]
37 'description': description
,