diff options
author | xarantolus <xarantolus@protonmail.com> | 2020-09-03 20:41:45 +0200 |
---|---|---|
committer | xarantolus <xarantolus@protonmail.com> | 2020-09-03 20:41:45 +0200 |
commit | 4c47858c0584f5e38904871f8543f7271d703cc2 (patch) | |
tree | 428c783afdb52ed8a20f685afec68d32f0fdb0ff | |
parent | 94255fa0b165d0646ae42e9b114f9dddaebc3123 (diff) | |
download | hypervideo-pre-4c47858c0584f5e38904871f8543f7271d703cc2.tar.lz hypervideo-pre-4c47858c0584f5e38904871f8543f7271d703cc2.tar.xz hypervideo-pre-4c47858c0584f5e38904871f8543f7271d703cc2.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.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 8f622662a..e62096bb2 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -3309,7 +3309,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 |