]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/dropbox.py
[extractor] Deprecate `_sort_formats`
[yt-dlp.git] / yt_dlp / extractor / dropbox.py
index 0d12513b2957338fcf8c26484b313d911b42c578..214b309bfd98d4cd674a6984ef95dbfe7501b4e3 100644 (file)
@@ -54,7 +54,7 @@ def _real_extract(self, url):
                 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)
 
@@ -63,7 +63,6 @@ def _real_extract(self, url):
             video_url = re.sub(r'[?&]dl=0', '', url)
             video_url += ('?' if '?' not in video_url else '&') + 'dl=1'
             formats.append({'url': video_url, 'format_id': 'original', 'format_note': 'Original', 'quality': 1})
-        self._sort_formats(formats)
 
         return {
             'id': video_id,