Don't crash if the 'sts' value doesn't exist in the ytplayer_config
Tested with values that definitely don't exist in the configuration.
This commit is contained in:
parent
9f6db1b2f4
commit
8997ae0469
@ -1439,7 +1439,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
# Try looking directly into the video webpage
|
# Try looking directly into the video webpage
|
||||||
ytplayer_config = self._get_ytplayer_config(video_id, video_webpage)
|
ytplayer_config = self._get_ytplayer_config(video_id, video_webpage)
|
||||||
if ytplayer_config:
|
if ytplayer_config:
|
||||||
sts = ytplayer_config['sts']
|
sts = ytplayer_config.get('sts', '')
|
||||||
args = ytplayer_config['args']
|
args = ytplayer_config['args']
|
||||||
if args.get('url_encoded_fmt_stream_map'):
|
if args.get('url_encoded_fmt_stream_map'):
|
||||||
# Convert to the same format returned by compat_parse_qs
|
# Convert to the same format returned by compat_parse_qs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user