Fix regex for other variable declaration type

This now supports declarations like `window["ytInitialData"] = ...` and `var ytInitialData = ...`
pull/2/head
xarantolus 4 years ago
parent 94255fa0b1
commit 4c47858c05

@ -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

Loading…
Cancel
Save