From 546e79d382b45fa12d005ac0adfc1ccf1f37b0be Mon Sep 17 00:00:00 2001 From: yasirarism <55983182+yasirarism@users.noreply.github.com> Date: Sun, 11 Dec 2022 18:47:46 +0700 Subject: [PATCH] Update ytdl_download_new.py --- misskaty/plugins/ytdl_download_new.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/misskaty/plugins/ytdl_download_new.py b/misskaty/plugins/ytdl_download_new.py index d1e35c85..d9a57220 100644 --- a/misskaty/plugins/ytdl_download_new.py +++ b/misskaty/plugins/ytdl_download_new.py @@ -68,7 +68,10 @@ async def ytdownv2(_, message): async with iYTDL( log_group_id=0, cache_path="cache", ffmpeg_location="/usr/bin/mediaextract" ) as ytdl: - x = await ytdl.parse(url) + try: + x = await ytdl.parse(url) + except Exception as e: + return await message.reply(str(e)) img = await get_ytthumb(x.key) caption = x.caption markup = x.buttons