0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-23 02:25:11 +00:00

[youtube] Enhance url_encoded_fmt_stream_map checking (fix #5361)

This commit is contained in:
Yen Chi Hsuan 2015-04-05 22:29:06 +08:00
parent 0de9312a7e
commit 3a9fadd6df

View file

@ -855,7 +855,8 @@ def _real_extract(self, url):
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:
if ('url_encoded_fmt_stream_map' not in args or
args['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)