From 0862378e565c31a0b98b6cd4551bd67832bcaa6b Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Sat, 19 Feb 2022 09:29:48 +0700 Subject: [PATCH] change format add more youtube-dl format and some removal --- program/downloader.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/program/downloader.py b/program/downloader.py index a6236bf..6cb9ed0 100644 --- a/program/downloader.py +++ b/program/downloader.py @@ -35,9 +35,11 @@ async def song_downloader(_, message): m = await message.reply("🔎 finding song...") ydl_ops = { 'format': 'bestaudio[ext=m4a]', - 'keepvideo': True, - 'prefer_ffmpeg': False, - 'geo_bypass': True, + 'geo-bypass': True, + 'noprogress': True, + 'user-agent': 'Mozilla/5.0 (Linux; Android 7.0; k960n_mt6580_32_n) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36', + 'extractor-args': 'youtube:player_client=all', + 'nocheckcertificate': True, 'outtmpl': '%(title)s.%(ext)s', 'quite': True, } @@ -98,8 +100,12 @@ async def video_downloader(_, message): ydl_opts = { "format": "best", "keepvideo": True, - "prefer_ffmpeg": False, - "geo_bypass": True, + "prefer-ffmpeg": False, + "geo-bypass": True, + "noprogress": True, + "user-agent": "Mozilla/5.0 (Linux; Android 7.0; k960n_mt6580_32_n) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36", + "extractor-args": "youtube:player_client=all", + "nocheckcertificate": True, "outtmpl": "%(title)s.%(ext)s", "quite": True, }