diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-11-04 22:49:23 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-11-04 22:49:23 +0600 |
commit | 89ea063eebae84792a7ccb968533ff8bf6a41d56 (patch) | |
tree | fff5754c9d78b2e94f8467fe44d0a95ca0b75d22 /youtube_dl/extractor/youtube.py | |
parent | 44b2264feae331eeb34e83eed1387def3d61a437 (diff) |
[youtube] Clarify rationale for preferring a video info with token (#7362)
Diffstat (limited to 'youtube_dl/extractor/youtube.py')
-rw-r--r-- | youtube_dl/extractor/youtube.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 5eeb3c663..e2a43299f 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -1107,6 +1107,15 @@ class YoutubeIE(YoutubeBaseInfoExtractor): if not video_info: video_info = get_video_info if 'token' in get_video_info: + # Different get_video_info requests may report different results, e.g. + # some may report video unavailability, but some may serve it without + # any complaint (see https://github.com/rg3/youtube-dl/issues/7362, + # the original webpage as well as el=info and el=embedded get_video_info + # requests report video unavailability due to geo restriction while + # el=detailpage succeeds and returns valid data). This is probably + # due to YouTube measures against IP ranges of hosting providers. + # Working around by preferring the first succeeded video_info containing + # the token if no such video_info yet was found. if 'token' not in video_info: video_info = get_video_info break |