]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/techtalks.py
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 'url': 'http://techtalks.tv/talks/learning-topic-models-going-beyond-svd/57758/',
17 'title': 'Learning Topic Models --- Going beyond SVD',
24 'title': 'Learning Topic Models --- Going beyond SVD',
31 'title': 'Learning Topic Models --- Going beyond SVD',
37 'skip_download': True,
40 'url': 'http://techtalks.tv/talks/57758',
41 'only_matching': True,
44 def _real_extract(self
, url
):
45 mobj
= self
._match
_valid
_url
(url
)
46 talk_id
= mobj
.group('id')
47 webpage
= self
._download
_webpage
(url
, talk_id
)
48 rtmp_url
= self
._search
_regex
(
49 r
'netConnectionUrl: \'(.*?
)\'', webpage, 'rtmp url
')
50 play_path = self._search_regex(
51 r'href
=\'(.*?
)\' [^
>]*id="flowplayer_presenter"',
52 webpage, 'presenter play path
')
53 title = clean_html(get_element_by_attribute('class', 'title
', webpage))
58 'play_path
': play_path,
61 m_slides = re.search(r'<a
class="slides" href
=\'(.*?
)\'', webpage)
73 'id': talk_id + '-slides
',
76 'play_path
': m_slides.group(1),