From db74de8c54d83a4a749b96d360c4f61ae5195632 Mon Sep 17 00:00:00 2001 From: zenerdi0de <83358565+zenerdi0de@users.noreply.github.com> Date: Thu, 17 Feb 2022 17:50:47 +0530 Subject: [PATCH] [dropbox] fix regex (#2814) Closes #2812 Authored by: zenerdi0de --- yt_dlp/extractor/dropbox.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yt_dlp/extractor/dropbox.py b/yt_dlp/extractor/dropbox.py index 3ae3a8d3dc..2559657ada 100644 --- a/yt_dlp/extractor/dropbox.py +++ b/yt_dlp/extractor/dropbox.py @@ -56,8 +56,8 @@ def _real_extract(self, url): else: raise ExtractorError('Password protected video, use --video-password ', expected=True) - json_string = self._html_search_regex(r'InitReact\.mountComponent.+ "props":(.+), "elem_id"', webpage, 'Info JSON') - info_json = self._parse_json(json_string, video_id) + 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') 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)