mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-08 21:04:50 +00:00
Tes rewrite ytdl
This commit is contained in:
parent
7c02282882
commit
e5b12ea168
1 changed files with 2 additions and 2 deletions
|
|
@ -20,11 +20,11 @@ YT_DB = {}
|
||||||
async def ytdownv2(_, message):
|
async def ytdownv2(_, message):
|
||||||
if len(message.command) == 1:
|
if len(message.command) == 1:
|
||||||
return await message.reply("Please input a valid YT-DLP Supported URL")
|
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(
|
async with iYTDL(
|
||||||
log_group_id=0, cache_path="cache", ffmpeg_location="/usr/bin/mediaextract"
|
log_group_id=0, cache_path="cache", ffmpeg_location="/usr/bin/mediaextract"
|
||||||
) as ytdl:
|
) as ytdl:
|
||||||
x = await ytdl.parse("https://www.youtube.com/watch?v=VGt-BZ-SxGI")
|
x = await ytdl.parse(url)
|
||||||
img = x.image_url
|
img = x.image_url
|
||||||
caption = x.caption
|
caption = x.caption
|
||||||
markup = x.buttons
|
markup = x.buttons
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue