]> jfr.im git - yt-dlp.git/commitdiff
[extractor/web.archive:youtube] Fix _YT_INITIAL_PLAYER_RESPONSE_RE
authorpukkandan <redacted>
Sat, 17 Sep 2022 15:24:21 +0000 (20:54 +0530)
committerpukkandan <redacted>
Sat, 17 Sep 2022 15:24:21 +0000 (20:54 +0530)
yt_dlp/extractor/archiveorg.py

index 0f40774ce1f995e4927da9f85cf657008cd4410e..25a289ff62face29e067b900801d1dce6e70b808 100644 (file)
@@ -526,9 +526,10 @@ class YoutubeWebArchiveIE(InfoExtractor):
         },
     ]
     _YT_INITIAL_DATA_RE = YoutubeBaseInfoExtractor._YT_INITIAL_DATA_RE
-    _YT_INITIAL_PLAYER_RESPONSE_RE = fr'''(?x)
+    _YT_INITIAL_PLAYER_RESPONSE_RE = fr'''(?x:
         (?:window\s*\[\s*["\']ytInitialPlayerResponse["\']\s*\]|ytInitialPlayerResponse)\s*=[(\s]*|
-        {YoutubeBaseInfoExtractor._YT_INITIAL_PLAYER_RESPONSE_RE}'''
+        {YoutubeBaseInfoExtractor._YT_INITIAL_PLAYER_RESPONSE_RE}
+    )'''
 
     _YT_DEFAULT_THUMB_SERVERS = ['i.ytimg.com']  # thumbnails most likely archived on these servers
     _YT_ALL_THUMB_SERVERS = orderedSet(