diff options
author | Aurélien Grosdidier <aurelien.grosdidier@gmail.com> | 2022-06-11 01:22:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-10 16:22:34 -0700 |
commit | d05460e5fee0dca9ab7463c78c630653fb37dcde (patch) | |
tree | 31a34afe106146ead5e12bc3cea8e2284445fd58 /yt_dlp/extractor/common.py | |
parent | 14c3a980492103d080908c1285dd59b978f11f71 (diff) | |
download | hypervideo-pre-d05460e5fee0dca9ab7463c78c630653fb37dcde.tar.lz hypervideo-pre-d05460e5fee0dca9ab7463c78c630653fb37dcde.tar.xz hypervideo-pre-d05460e5fee0dca9ab7463c78c630653fb37dcde.zip |
[extractor/FranceCulture] Fix extractor (#3874)
Closes #3742
Authored by: aurelg, pukkandan
Diffstat (limited to 'yt_dlp/extractor/common.py')
-rw-r--r-- | yt_dlp/extractor/common.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index 316b58ce3..f63be0975 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -1188,11 +1188,11 @@ class InfoExtractor: self.report_warning('unable to extract %s' % _name + bug_reports_message()) return None - def _search_json(self, start_pattern, string, name, video_id, *, end_pattern='', fatal=True, **kwargs): + def _search_json(self, start_pattern, string, name, video_id, *, end_pattern='', contains_pattern='.+', fatal=True, **kwargs): """Searches string for the JSON object specified by start_pattern""" # NB: end_pattern is only used to reduce the size of the initial match return self._parse_json( - self._search_regex(rf'{start_pattern}\s*(?P<json>{{.+}})\s*{end_pattern}', + self._search_regex(rf'{start_pattern}\s*(?P<json>{{{contains_pattern}}})\s*{end_pattern}', string, name, group='json', fatal=fatal) or '{}', video_id, fatal=fatal, ignore_extra=True, **kwargs) or {} |