mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-02 02:44:50 +00:00
Update ytdl_download_new.py
This commit is contained in:
parent
546e79d382
commit
8e55860d3a
1 changed files with 3 additions and 4 deletions
|
|
@ -68,10 +68,9 @@ async def ytdownv2(_, message):
|
|||
async with iYTDL(
|
||||
log_group_id=0, cache_path="cache", ffmpeg_location="/usr/bin/mediaextract"
|
||||
) as ytdl:
|
||||
try:
|
||||
x = await ytdl.parse(url)
|
||||
except Exception as e:
|
||||
return await message.reply(str(e))
|
||||
x = await ytdl.parse(url)
|
||||
if "ERROR" in x:
|
||||
return await message.reply(f"<code>{x}</code>")
|
||||
img = await get_ytthumb(x.key)
|
||||
caption = x.caption
|
||||
markup = x.buttons
|
||||
|
|
|
|||
Loading…
Reference in a new issue