[dropbox] fix regex (#2814)

Closes #2812
Authored by: zenerdi0de
This commit is contained in:
zenerdi0de 2022-02-17 17:50:47 +05:30 committed by GitHub
parent edecb5f81f
commit db74de8c54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,8 +56,8 @@ def _real_extract(self, url):
else: else:
raise ExtractorError('Password protected video, use --video-password <password>', expected=True) raise ExtractorError('Password protected video, use --video-password <password>', expected=True)
json_string = self._html_search_regex(r'InitReact\.mountComponent.+ "props":(.+), "elem_id"', webpage, 'Info JSON') json_string = self._html_search_regex(r'InitReact\.mountComponent\(.*?,\s*(\{.+\})\s*?\)', webpage, 'Info JSON')
info_json = self._parse_json(json_string, video_id) info_json = self._parse_json(json_string, video_id).get('props')
transcode_url = traverse_obj(info_json, ((None, 'preview'), 'file', 'preview', 'content', 'transcode_url'), get_all=False) 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) formats, subtitles = self._extract_m3u8_formats_and_subtitles(transcode_url, video_id)