]>
Commit | Line | Data |
---|---|---|
1 | from .common import InfoExtractor | |
2 | ||
3 | ||
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, | |
14 | }, | |
15 | } | |
16 | ||
17 | def _real_extract(self, url): | |
18 | video_id = self._match_id(url) | |
19 | webpage = self._download_webpage(url, video_id) | |
20 | ||
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') | |
26 | ||
27 | return { | |
28 | '_type': 'url_transparent', | |
29 | 'id': video_id, | |
30 | 'url': f'{root_path}xml/{xml_file_id}.xml', | |
31 | 'ie_key': 'DigitallySpeaking', | |
32 | } |