Fix the 429 error (partially)

This change will help to fix the 429 error.
Youtube is blocking requests to youtube.com/get_video_info and not other pages(even with captcha resolving), but as I checked we don't need "youtube.com/get_video_info" mostly and the `player_response` is enough.
This commit is contained in:
Amin Rezaei 2020-01-12 14:02:15 +03:30 committed by GitHub
parent aca2fd222f
commit 43f2db009d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1795,7 +1795,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
errnote='unable to download video info webpage',
fatal=False, query=query)
if not video_info_webpage:
continue
video_info = try_get(player_response, lambda x: x['videoDetails'], dict) or {}
break
get_video_info = compat_parse_qs(video_info_webpage)
if not player_response:
pl_response = get_video_info.get('player_response', [None])[0]