Explorar o código

[youtube] Prefer video_info with token available

Sergey M․ %!s(int64=10) %!d(string=hai) anos
pai
achega
44b2264fea
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      youtube_dl/extractor/youtube.py

+ 2 - 0
youtube_dl/extractor/youtube.py

@@ -1107,6 +1107,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
                     if not video_info:
                         video_info = get_video_info
                     if 'token' in get_video_info:
+                        if 'token' not in video_info:
+                            video_info = get_video_info
                         break
         if 'token' not in video_info:
             if 'reason' in video_info: