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