1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-25 08:10:31 +01:00

[youtube] Simplify url_encoded_fmt_stream_map check

This commit is contained in:
Sergey M․ 2015-04-06 00:45:57 +06:00
parent 06b491eb7b
commit e40bd5f06b

View File

@ -871,8 +871,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
args = ytplayer_config['args']
# Convert to the same format returned by compat_parse_qs
video_info = dict((k, [v]) for k, v in args.items())
if ('url_encoded_fmt_stream_map' not in args or
args['url_encoded_fmt_stream_map'] == ''):
if not args.get('url_encoded_fmt_stream_map'):
raise ValueError('No stream_map present') # caught below
except ValueError:
# We fallback to the get_video_info pages (used by the embed page)