1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 08:35:32 +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

@ -54,7 +54,7 @@ class DropboxIE(InfoExtractor):
raise ExtractorError('Password protected video, use --video-password <password>', expected=True)
info_json = self._search_json(r'InitReact\.mountComponent\(.*?,', webpage, 'mountComponent', video_id,
contains_pattern=r'.+?"preview".+?', end_pattern=r'\)')['props']
contains_pattern=r'{.+?"preview".+?}', end_pattern=r'\)')['props']
transcode_url = traverse_obj(info_json, ((None, 'preview'), 'file', 'preview', 'content', 'transcode_url'), get_all=False)
formats, subtitles = self._extract_m3u8_formats_and_subtitles(transcode_url, video_id)