mirror of
https://github.com/soimort/you-get.git
synced 2025-01-24 22:15:03 +03:00
[youtube] use url_encoded_fmt_stream_map from video page, fix #1502
This commit is contained in:
parent
d04997ec9b
commit
51dd7ad8e6
@ -155,6 +155,8 @@ class YouTube(VideoExtractor):
|
|||||||
try:
|
try:
|
||||||
ytplayer_config = json.loads(re.search('ytplayer.config\s*=\s*([^\n]+?});', video_page).group(1))
|
ytplayer_config = json.loads(re.search('ytplayer.config\s*=\s*([^\n]+?});', video_page).group(1))
|
||||||
self.html5player = 'https:' + ytplayer_config['assets']['js']
|
self.html5player = 'https:' + ytplayer_config['assets']['js']
|
||||||
|
# Workaround: get_video_info returns bad s. Why?
|
||||||
|
stream_list = ytplayer_config['args']['url_encoded_fmt_stream_map'].split(',')
|
||||||
except:
|
except:
|
||||||
self.html5player = None
|
self.html5player = None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user