1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-31 22:55:18 +00:00

[extractor] Make search_json able to parse lists

Now `contains_pattern` can be set to `\[.+\]`
This commit is contained in:
pukkandan
2022-10-03 16:50:27 +05:30
parent a83333c432
commit 8b7fb8b60d
3 changed files with 4 additions and 4 deletions

View File

@@ -84,7 +84,7 @@ class FranceCultureIE(InfoExtractor):
webpage = self._download_webpage(url, display_id)
# _search_json_ld doesn't correctly handle this. See https://github.com/yt-dlp/yt-dlp/pull/3874#discussion_r891903846
video_data = self._search_json('', webpage, 'audio data', display_id, contains_pattern=r'\s*"@type"\s*:\s*"AudioObject"\s*.+')
video_data = self._search_json('', webpage, 'audio data', display_id, contains_pattern=r'{\s*"@type"\s*:\s*"AudioObject".+}')
return {
'id': video_id,