From 62d80ba17c5d4f06c324991b076597ec8c5a8c33 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Fri, 8 Jan 2021 23:27:00 +0530 Subject: [PATCH] [youtube] Fix bug (Closes https://github.com/pukkandan/yt-dlc/issues/10) --- youtube_dlc/extractor/youtube.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/youtube_dlc/extractor/youtube.py b/youtube_dlc/extractor/youtube.py index 59e5bc2ab..9c9292a38 100644 --- a/youtube_dlc/extractor/youtube.py +++ b/youtube_dlc/extractor/youtube.py @@ -1686,11 +1686,12 @@ def extract_embedded_config(embed_webpage, video_id): if embedded_config: return embedded_config + video_info = {} player_response = {} + ytplayer_config = None + embed_webpage = None # Get video info - video_info = {} - embed_webpage = None if (self._og_search_property('restrictions:age', video_webpage, default=None) == '18+' or re.search(r'player-age-gate-content">', video_webpage) is not None): cookie_keys = self._get_cookies('https://www.youtube.com').keys()