Skip to content

Commit

Permalink
Update yt_dlp/extractor/facebook.py
Browse files Browse the repository at this point in the history
Co-authored-by: sepro <[email protected]>
  • Loading branch information
kclauhk and seproDev authored Nov 1, 2023
1 parent 8cc7f16 commit ff849f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yt_dlp/extractor/facebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ def extract_metadata(webpage):
automatic_captions = {}
subtitles = {}
if isinstance(captions, str):
subtitles[locale] = [{'ext': self._search_regex(r'\.(\w{3,})\?', captions, 'captions_ext', default='srt'), 'url': captions}]
subtitles[locale] = [{'ext': determine_ext(captions, default_ext='srt'), 'url': captions}]
elif isinstance(captions, list):
if len(captions) > 1:
captions = sorted(captions, key=lambda c: (c['locale'] != locale, c['locale']))
Expand Down

0 comments on commit ff849f1

Please sign in to comment.