5 from .common import InfoExtractor
11 class AcademicEarthCourseIE(InfoExtractor):
12 _VALID_URL = r'^https?://(?:www\.)?academicearth\.org/(?:courses|playlists)/(?P<id>[^?#/]+)'
13 IE_NAME = u'AcademicEarth:Course'
15 def _real_extract(self, url):
16 m = re.match(self._VALID_URL, url)
17 playlist_id = m.group('id')
19 webpage = self._download_webpage(url, playlist_id)
20 title = self._html_search_regex(
21 r'<h1 class="playlist-name">(.*?)</h1>', webpage, u'title')
22 description = self._html_search_regex(
23 r'<p class="excerpt">(.*?)</p>',
24 webpage, u'description', fatal=False)
26 r'<h3 class="lecture-title"><a target="_blank" href="([^"]+)">',
28 entries = [self.url_result(u) for u in urls]
34 'description': description,