compatibility improvement

This commit is contained in:
Tom Yang 2021-05-05 00:05:25 -04:00 committed by BennyThink
parent f538e143ba
commit 8f2ff8f8bf
No known key found for this signature in database
GPG key ID: 6CD0DBDA5235D481

View file

@ -105,7 +105,8 @@ def ytdl_download(url, tempdir, chat_id, message) -> dict:
ydl_opts = {
'progress_hooks': [lambda d: progress_hook(d, chat_id, message)],
'outtmpl': output,
'restrictfilenames': True
'restrictfilenames': True,
'format': 'bestvideo[vcodec^=avc]+bestaudio[acodec^=mp4a]/best'
}
try:
with youtube_dl.YoutubeDL(ydl_opts) as ydl: