From e5b12ea168ce94ecd12ffba614f7422850f12f78 Mon Sep 17 00:00:00 2001 From: yasir Date: Sat, 10 Dec 2022 12:05:50 +0700 Subject: [PATCH] Tes rewrite ytdl --- misskaty/plugins/ytdl_download_new.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misskaty/plugins/ytdl_download_new.py b/misskaty/plugins/ytdl_download_new.py index 13c4e509..322ba9ab 100644 --- a/misskaty/plugins/ytdl_download_new.py +++ b/misskaty/plugins/ytdl_download_new.py @@ -20,11 +20,11 @@ YT_DB = {} async def ytdownv2(_, message): if len(message.command) == 1: return await message.reply("Please input a valid YT-DLP Supported URL") - query = message.text.split(" ", maxsplit=1)[1] + url = message.text.split(" ", maxsplit=1)[1] async with iYTDL( log_group_id=0, cache_path="cache", ffmpeg_location="/usr/bin/mediaextract" ) as ytdl: - x = await ytdl.parse("https://www.youtube.com/watch?v=VGt-BZ-SxGI") + x = await ytdl.parse(url) img = x.image_url caption = x.caption markup = x.buttons