]> jfr.im git - yt-dlp.git/blame - yt_dlp/extractor/gputechconf.py
[adobepass] Add MSO Sling TV (#596)
[yt-dlp.git] / yt_dlp / extractor / gputechconf.py
CommitLineData
ec6504b3 1# coding: utf-8
2from __future__ import unicode_literals
3
4from .common import InfoExtractor
ec6504b3 5
6
7class GPUTechConfIE(InfoExtractor):
8 _VALID_URL = r'https?://on-demand\.gputechconf\.com/gtc/2015/video/S(?P<id>\d+)\.html'
9 _TEST = {
10 'url': 'http://on-demand.gputechconf.com/gtc/2015/video/S5156.html',
11 'md5': 'a8862a00a0fd65b8b43acc5b8e33f798',
12 'info_dict': {
13 'id': '5156',
14 'ext': 'mp4',
15 'title': 'Coordinating More Than 3 Million CUDA Threads for Social Network Analysis',
16 'duration': 1219,
17 }
18 }
19
20 def _real_extract(self, url):
21 video_id = self._match_id(url)
22 webpage = self._download_webpage(url, video_id)
23
ec59d657
YCH
24 root_path = self._search_regex(
25 r'var\s+rootPath\s*=\s*"([^"]+)', webpage, 'root path',
26 default='http://evt.dispeak.com/nvidia/events/gtc15/')
27 xml_file_id = self._search_regex(
28 r'var\s+xmlFileId\s*=\s*"([^"]+)', webpage, 'xml file id')
ec6504b3 29
30 return {
ec59d657 31 '_type': 'url_transparent',
ec6504b3 32 'id': video_id,
ec59d657 33 'url': '%sxml/%s.xml' % (root_path, xml_file_id),
982e518a 34 'ie_key': 'DigitallySpeaking',
ec6504b3 35 }