[cleanup] Misc (#8968)
[yt-dlp.git] / yt_dlp / extractor / gputechconf.py
blob2d13bf4915ee0957ee7ace664e38599cc808de07
1 from .common import InfoExtractor
4 class GPUTechConfIE(InfoExtractor):
5 _VALID_URL = r'https?://on-demand\.gputechconf\.com/gtc/2015/video/S(?P<id>\d+)\.html'
6 _TEST = {
7 'url': 'http://on-demand.gputechconf.com/gtc/2015/video/S5156.html',
8 'md5': 'a8862a00a0fd65b8b43acc5b8e33f798',
9 'info_dict': {
10 'id': '5156',
11 'ext': 'mp4',
12 'title': 'Coordinating More Than 3 Million CUDA Threads for Social Network Analysis',
13 'duration': 1219,
17 def _real_extract(self, url):
18 video_id = self._match_id(url)
19 webpage = self._download_webpage(url, video_id)
21 root_path = self._search_regex(
22 r'var\s+rootPath\s*=\s*"([^"]+)', webpage, 'root path',
23 default='http://evt.dispeak.com/nvidia/events/gtc15/')
24 xml_file_id = self._search_regex(
25 r'var\s+xmlFileId\s*=\s*"([^"]+)', webpage, 'xml file id')
27 return {
28 '_type': 'url_transparent',
29 'id': video_id,
30 'url': '%sxml/%s.xml' % (root_path, xml_file_id),
31 'ie_key': 'DigitallySpeaking',