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