1
0
mirror of https://github.com/l1ving/youtube-dl synced 2024-12-22 21:12:53 +08:00

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

This commit is contained in:
Yen Chi Hsuan 2015-06-06 22:22:26 +08:00
parent 423d2be5f8
commit 4da31bd566

View File

@ -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')],