Browse Source

[youtube] Fix a FutureWarning from xml.etree.ElementTree

master
Yen Chi Hsuan 9 years ago
parent
commit
4da31bd566
1 changed files with 1 additions and 1 deletions
  1. 2
      youtube_dl/extractor/youtube.py

2
youtube_dl/extractor/youtube.py

@ -816,7 +816,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
'filesize': filesize, 'filesize': filesize,
'fps': int_or_none(r.attrib.get('frameRate')), 'fps': int_or_none(r.attrib.get('frameRate')),
} }
if segment_list:
if len(segment_list):
f.update({ f.update({
'initialization_url': segment_list.find('{urn:mpeg:DASH:schema:MPD:2011}Initialization').attrib['sourceURL'], 'initialization_url': segment_list.find('{urn:mpeg:DASH:schema:MPD:2011}Initialization').attrib['sourceURL'],
'segment_urls': [segment.attrib.get('media') for segment in segment_list.findall('{urn:mpeg:DASH:schema:MPD:2011}SegmentURL')], 'segment_urls': [segment.attrib.get('media') for segment in segment_list.findall('{urn:mpeg:DASH:schema:MPD:2011}SegmentURL')],

Loading…
Cancel
Save