[extractor/dropbox] Extract the correct `mountComponent`

This commit is contained in:
pukkandan 2022-06-19 06:45:35 +05:30
parent f0bc6e2019
commit f254d6ccd9
No known key found for this signature in database
GPG Key ID: 7EEE9E1E817D0A39
1 changed files with 2 additions and 2 deletions

View File

@ -53,8 +53,8 @@ class DropboxIE(InfoExtractor):
else:
raise ExtractorError('Password protected video, use --video-password <password>', expected=True)
json_string = self._html_search_regex(r'InitReact\.mountComponent\(.*?,\s*(\{.+\})\s*?\)', webpage, 'Info JSON')
info_json = self._parse_json(json_string, video_id).get('props')
info_json = self._search_json(r'InitReact\.mountComponent\(.*?,', webpage, 'mountComponent', video_id,
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)