From 2d3d7a9693c75419f8571e4402b2b64c43d283e8 Mon Sep 17 00:00:00 2001 From: yasirarism <55983182+yasirarism@users.noreply.github.com> Date: Sun, 11 Dec 2022 19:28:43 +0700 Subject: [PATCH] Update ytdl_download_new.py --- misskaty/plugins/ytdl_download_new.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/misskaty/plugins/ytdl_download_new.py b/misskaty/plugins/ytdl_download_new.py index d5b158c4..d6a9ea45 100644 --- a/misskaty/plugins/ytdl_download_new.py +++ b/misskaty/plugins/ytdl_download_new.py @@ -69,9 +69,8 @@ async def ytdownv2(_, message): log_group_id=0, cache_path="cache", ffmpeg_location="/usr/bin/mediaextract" ) as ytdl: x = await ytdl.parse(url) - LOGGER.info(x) - if "ERROR" in str(x): - return await message.reply(f"{str(x)}") + if x is None: + return await message.reply("Failed parse URL, check logs..") img = await get_ytthumb(x.key) caption = x.caption markup = x.buttons