aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-09-17 20:54:21 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-09-17 20:54:21 +0530
commit19b4e59a1e1bf368078f90e7f735fa4576f97b64 (patch)
tree6dbb8aceba72d106c9df6b995a6063e796c3b69d
parentdab284f80fb08675008eec39a4561fed1cf1617b (diff)
downloadhypervideo-pre-19b4e59a1e1bf368078f90e7f735fa4576f97b64.tar.lz
hypervideo-pre-19b4e59a1e1bf368078f90e7f735fa4576f97b64.tar.xz
hypervideo-pre-19b4e59a1e1bf368078f90e7f735fa4576f97b64.zip
[extractor/web.archive:youtube] Fix _YT_INITIAL_PLAYER_RESPONSE_RE
-rw-r--r--yt_dlp/extractor/archiveorg.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/yt_dlp/extractor/archiveorg.py b/yt_dlp/extractor/archiveorg.py
index 0f40774ce..25a289ff6 100644
--- a/yt_dlp/extractor/archiveorg.py
+++ b/yt_dlp/extractor/archiveorg.py
@@ -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(