3 from .common import InfoExtractor
5 get_element_by_attribute,
10 class TechTalksIE(InfoExtractor):
11 _VALID_URL = r'https?://techtalks\.tv/talks/[^/]*/(?P<id>\d+)/'
14 u'url': u'http://techtalks.tv/talks/learning-topic-models-going-beyond-svd/57758/',
17 u'file': u'57758.flv',
19 u'title': u'Learning Topic Models --- Going beyond SVD',
23 u'file': u'57758-slides.flv',
25 u'title': u'Learning Topic Models --- Going beyond SVD',
31 u'skip_download': True,
35 def _real_extract(self, url):
36 mobj = re.match(self._VALID_URL, url)
37 talk_id = mobj.group('id')
38 webpage = self._download_webpage(url, talk_id)
39 rtmp_url = self._search_regex(r'netConnectionUrl: \'(.*?)\'', webpage,
41 play_path = self._search_regex(r'href=\'(.*?)\' [^>]*id="flowplayer_presenter"',
42 webpage, u'presenter play path')
43 title = clean_html(get_element_by_attribute('class', 'title', webpage))
48 'play_path': play_path,
51 m_slides = re.search(r'<a class="slides" href=\'(.*?)\'', webpage)
59 'id': talk_id + '-slides',
62 'play_path': m_slides.group(1),