aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxarantolus <xarantolus@protonmail.com>2020-09-03 20:41:45 +0200
committerxarantolus <xarantolus@protonmail.com>2020-09-06 09:22:49 +0200
commitbea9b00588a2d5376c8edeaa968d4c484db415c8 (patch)
treef699bfdec265b29f38d9caaab9c42badbbca5dfe
parentf442082a50f94fc3c36db954764b70d6a08beaa1 (diff)
downloadhypervideo-pre-bea9b00588a2d5376c8edeaa968d4c484db415c8.tar.lz
hypervideo-pre-bea9b00588a2d5376c8edeaa968d4c484db415c8.tar.xz
hypervideo-pre-bea9b00588a2d5376c8edeaa968d4c484db415c8.zip
Fix regex for other variable declaration type
This now supports declarations like `window["ytInitialData"] = ...` and `var ytInitialData = ...`
-rw-r--r--youtube_dl/extractor/youtube.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index c8d80bbd2..c03ca5b31 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -3313,7 +3313,7 @@ class YoutubeFeedsInfoExtractor(YoutubeBaseInfoExtractor):
Subclasses must define the _FEED_NAME and _PLAYLIST_TITLE properties.
"""
_LOGIN_REQUIRED = True
- _FEED_DATA = r'window\[\"ytInitialData\"\]\W?=\W?({.*?});'
+ _FEED_DATA = r'(?:window\["ytInitialData"\]|ytInitialData)\W?=\W?({.*?});'
_YTCFG_DATA = r"ytcfg.set\(({.*?})\)"
@property