X-Git-Url: https://git.rapsys.eu/youtubedl/blobdiff_plain/03342304420e5daeb428ffdcc7bbd2bbfecfa61a..20205e79eb4216762c923790b27dbe38f945293a:/youtube_dl/extractor/gputechconf.py diff --git a/youtube_dl/extractor/gputechconf.py b/youtube_dl/extractor/gputechconf.py index 145b55b..73dc62c 100644 --- a/youtube_dl/extractor/gputechconf.py +++ b/youtube_dl/extractor/gputechconf.py @@ -2,12 +2,6 @@ from __future__ import unicode_literals from .common import InfoExtractor -from ..utils import ( - xpath_element, - xpath_text, - int_or_none, - parse_duration, -) class GPUTechConfIE(InfoExtractor): @@ -27,29 +21,15 @@ class GPUTechConfIE(InfoExtractor): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) - root_path = self._search_regex(r'var\s+rootPath\s*=\s*"([^"]+)', webpage, 'root path', 'http://evt.dispeak.com/nvidia/events/gtc15/') - xml_file_id = self._search_regex(r'var\s+xmlFileId\s*=\s*"([^"]+)', webpage, 'xml file id') - - doc = self._download_xml('%sxml/%s.xml' % (root_path, xml_file_id), video_id) - - metadata = xpath_element(doc, 'metadata') - http_host = xpath_text(metadata, 'httpHost', 'http host', True) - mbr_videos = xpath_element(metadata, 'MBRVideos') - - formats = [] - for mbr_video in mbr_videos.findall('MBRVideo'): - stream_name = xpath_text(mbr_video, 'streamName') - if stream_name: - formats.append({ - 'url': 'http://%s/%s' % (http_host, stream_name.replace('mp4:', '')), - 'tbr': int_or_none(xpath_text(mbr_video, 'bitrate')), - }) - self._sort_formats(formats) + root_path = self._search_regex( + r'var\s+rootPath\s*=\s*"([^"]+)', webpage, 'root path', + default='http://evt.dispeak.com/nvidia/events/gtc15/') + xml_file_id = self._search_regex( + r'var\s+xmlFileId\s*=\s*"([^"]+)', webpage, 'xml file id') return { + '_type': 'url_transparent', 'id': video_id, - 'title': xpath_text(metadata, 'title'), - 'duration': parse_duration(xpath_text(metadata, 'endTime')), - 'creator': xpath_text(metadata, 'speaker'), - 'formats': formats, + 'url': '%sxml/%s.xml' % (root_path, xml_file_id), + 'ie_key': 'DigitallySpeaking', }