mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-01 18:44:50 +00:00
Update ytdl_download_new.py
This commit is contained in:
parent
45b9fb1c42
commit
8e8fa0b71f
1 changed files with 4 additions and 3 deletions
|
|
@ -68,9 +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)
|
||||
if x is None:
|
||||
return await message.reply("Failed parse URL, check logs..")
|
||||
try:
|
||||
x = await ytdl.parse(url)
|
||||
except Exception err:
|
||||
return await message.reply(f"<code>{err}</code>")
|
||||
img = await get_ytthumb(x.key)
|
||||
caption = x.caption
|
||||
markup = x.buttons
|
||||
|
|
|
|||
Loading…
Reference in a new issue