From b3d12425345fab4165cb61b0a117b9de8e4e5a5c Mon Sep 17 00:00:00 2001 From: pukkandan Date: Sat, 27 Feb 2021 14:45:56 +0530 Subject: [PATCH] [youtube] Fix inconsistent `webpage_url` (closes #119) --- yt_dlp/extractor/youtube.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py index d30faf94c..41b894776 100644 --- a/yt_dlp/extractor/youtube.py +++ b/yt_dlp/extractor/youtube.py @@ -1452,8 +1452,10 @@ def _real_extract(self, url): url, smuggled_data = unsmuggle_url(url, {}) video_id = self._match_id(url) base_url = self.http_scheme() + '//www.youtube.com/' - webpage_url = base_url + 'watch?v=' + video_id + '&has_verified=1&bpctr=9999999999' - webpage = self._download_webpage(webpage_url, video_id, fatal=False) + webpage_url = base_url + 'watch?v=' + video_id + webpage = self._download_webpage( + webpage_url + '&has_verified=1&bpctr=9999999999', + video_id, fatal=False) player_response = None if webpage: