Merge b5f1fcb5f99086f99bdfe5c19d238794c0334da9 into 3eb8d22ddb8982ca4fb56bb7a8d6517538bf14c6

This commit is contained in:
Adebimpe51 2025-04-01 07:43:11 +02:00 committed by GitHub
commit ebadb8848b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -192,10 +192,15 @@ class GoogleDriveIE(InfoExtractor):
if len(fmt_stream_split) < 2:
continue
format_id, format_url = fmt_stream_split[:2]
# Try to get the extension from the known formats
ext = self._FORMATS_EXT.get(format_id)
# Fallback: Determine extension from the URL (defaulting to 'mp4' if not found)
if not ext:
ext = determine_ext(format_url, 'mp4').lower()
f = {
'url': lowercase_escape(format_url),
'format_id': format_id,
'ext': self._FORMATS_EXT[format_id],
'ext': ext,
}
resolution = resolutions.get(format_id)
if resolution:
@ -205,6 +210,7 @@ class GoogleDriveIE(InfoExtractor):
})
formats.append(f)
source_url = update_url_query(
'https://drive.google.com/uc', {
'id': video_id,