mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-05-11 00:04:50 +09:00
Merge b5f1fcb5f99086f99bdfe5c19d238794c0334da9 into 3eb8d22ddb8982ca4fb56bb7a8d6517538bf14c6
This commit is contained in:
commit
ebadb8848b
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user