1
0
Fork 0
mirror of https://codeberg.org/polarisfm/youtube-dl.git synced 2024-12-30 19:45:06 +00:00

[common] Fix for youtube

This commit is contained in:
Yen Chi Hsuan 2016-01-30 21:36:01 +08:00
parent 5d2c0fd9ba
commit 5ea1eb78f5

View file

@ -1346,8 +1346,8 @@ class InfoExtractor(object):
elif mime_type.startswith('audio/') or mime_type.startswith('video/'): elif mime_type.startswith('audio/') or mime_type.startswith('video/'):
segment_list = r.find(_add_ns('SegmentList')) segment_list = r.find(_add_ns('SegmentList'))
format_id = r.attrib['id'] format_id = r.attrib['id']
video_url = url_el.text if url_el else None video_url = url_el.text if url_el is not None else None
filesize = int_or_none(url_el.attrib.get('{http://youtube.com/yt/2012/10/10}contentLength') if url_el else None) filesize = int_or_none(url_el.attrib.get('{http://youtube.com/yt/2012/10/10}contentLength') if url_el is not None else None)
f = { f = {
'format_id': format_id, 'format_id': format_id,
'url': video_url, 'url': video_url,