mirror of
https://github.com/tgbot-collection/ytdlbot.git
synced 2025-02-25 15:54:09 +08:00
Always use the source
format for Google Drive URLs (#300)
Always using the `source` format for Google Drive URLs will ensure getting original file, without any modifications.
This commit is contained in:
parent
82ba992a84
commit
6bce8b92dc
1 changed files with 11 additions and 6 deletions
|
@ -169,8 +169,13 @@ def ytdl_download(url: str, tempdir: str, bm, **kwargs) -> list:
|
|||
"--max-concurrent-downloads=16",
|
||||
"--split=16",
|
||||
]
|
||||
if url.startswith("https://drive.google.com"):
|
||||
# Always use the `source` format for Google Drive URLs.
|
||||
formats = ["source"]
|
||||
else:
|
||||
# Use the default formats for other URLs.
|
||||
formats = [
|
||||
# webm , vp9 and av01 are not streamable on telegram, so we'll extract mp4 and not av01 codec
|
||||
# webm , vp9 and av01 are not streamable on telegram, so we'll extract only mp4
|
||||
"bestvideo[ext=mp4][vcodec!*=av01][vcodec!*=vp09]+bestaudio[ext=m4a]/bestvideo+bestaudio",
|
||||
"bestvideo[vcodec^=avc]+bestaudio[acodec^=mp4a]/best[vcodec^=avc]/best",
|
||||
None,
|
||||
|
|
Loading…
Reference in a new issue