diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2016-01-30 21:36:01 +0800 |
---|---|---|
committer | Yen Chi Hsuan <yan12125@gmail.com> | 2016-01-30 21:36:01 +0800 |
commit | 5ea1eb78f5e8d9b2ede35504dc3b999f5f89bbaa (patch) | |
tree | 65fd1b61b96ffc319e7419cca4d152ffd700f9c0 /youtube_dl/extractor/common.py | |
parent | 5d2c0fd9ba2251a5c91b7d8b1dd285b427a2251e (diff) |
[common] Fix for youtube
Diffstat (limited to 'youtube_dl/extractor/common.py')
-rw-r--r-- | youtube_dl/extractor/common.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 83628a68f..243db71dc 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -1346,8 +1346,8 @@ class InfoExtractor(object): elif mime_type.startswith('audio/') or mime_type.startswith('video/'): segment_list = r.find(_add_ns('SegmentList')) format_id = r.attrib['id'] - video_url = url_el.text if url_el else None - filesize = int_or_none(url_el.attrib.get('{http://youtube.com/yt/2012/10/10}contentLength') 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 is not None else None) f = { 'format_id': format_id, 'url': video_url, |