1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-06-20 06:26:49 +02:00

[NovaEmbed] update player regex (#2008)

Authored by: std-move
This commit is contained in:
std-move 2021-12-15 20:55:11 +01:00 committed by GitHub
parent 3116be32b4
commit fe69f52e5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,7 +54,7 @@ def _real_extract(self, url):
player = self._parse_json(
self._search_regex(
(r'(?:replacePlaceholders.*?:\s*)?replacePlaceholders\s*\(\s*(?P<json>{.*})\s*\)(?:\s*\))?\s*,',
(r'(?:(?:replacePlaceholders|processAdTagModifier).*?:\s*)?(?:replacePlaceholders|processAdTagModifier)\s*\(\s*(?P<json>{.*?})\s*\)(?:\s*\))?\s*,',
r'Player\.init\s*\([^,]+,(?P<cndn>\s*\w+\s*\?)?\s*(?P<json>{(?(cndn).+?|.+)})\s*(?(cndn):|,\s*{.+?}\s*\)\s*;)'),
webpage, 'player', default='{}', group='json'), video_id, fatal=False)
if player: