diff options
| author | remitamine <remitamine@gmail.com> | 2015-12-19 23:59:00 +0100 | 
|---|---|---|
| committer | remitamine <remitamine@gmail.com> | 2015-12-19 23:59:00 +0100 | 
| commit | 1deb710f26b0ccd14db13103cb400b663e243c57 (patch) | |
| tree | 33f86660e53836ee4c2a480dc3fffdf01f353da3 /youtube_dl/extractor/gputechconf.py | |
| parent | ec6504b39c9b3d9766c551691a96e481278fa659 (diff) | |
[gputechconf] improve extraction
Diffstat (limited to 'youtube_dl/extractor/gputechconf.py')
| -rw-r--r-- | youtube_dl/extractor/gputechconf.py | 6 | 
1 files changed, 2 insertions, 4 deletions
| diff --git a/youtube_dl/extractor/gputechconf.py b/youtube_dl/extractor/gputechconf.py index becc61f1e..145b55bf3 100644 --- a/youtube_dl/extractor/gputechconf.py +++ b/youtube_dl/extractor/gputechconf.py @@ -33,18 +33,16 @@ class GPUTechConfIE(InfoExtractor):          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 = 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: -                bitrate = int_or_none(xpath_text(mbr_video, 'bitrate'))                  formats.append({                      'url': 'http://%s/%s' % (http_host, stream_name.replace('mp4:', '')), -                    'tbr': bitrate, -                    'format_id': 'http-%d' % bitrate, +                    'tbr': int_or_none(xpath_text(mbr_video, 'bitrate')),                  })          self._sort_formats(formats) | 
