mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 17:44:50 +00:00
subdl
This commit is contained in:
parent
5873b078c6
commit
37b709bab9
1 changed files with 4 additions and 4 deletions
|
|
@ -183,14 +183,14 @@ async def dlsub_callback(client, callback_query):
|
|||
CurrentPage = int(callback_query.data.split("#")[1])
|
||||
try:
|
||||
link = SUB_DL_DICT[message_id][0][CurrentPage - 1][idlink - 1].get("link")
|
||||
title = SUB_DL_DICT[message_id][0][CurrentPage - 1][idlink - 1].get("title")
|
||||
except KeyError:
|
||||
await callback_query.answer("Invalid callback data, please send CMD again..")
|
||||
await asyncio.sleep(3)
|
||||
return await callback_query.message.delete()
|
||||
scraper = cfscrape.create_scraper()
|
||||
res = await down_page(link)
|
||||
judul = res.get("title")
|
||||
dl = scraper.get(res.get("download_url"))
|
||||
f = open(f"{judul}.zip", mode='wb').write(dl.content)
|
||||
await callback_query.message.reply_document(f"{judul}.zip", caption=f"Title: {judul}\nIMDb: {res['imdb']}\nAuthor: {res['author_name']}")
|
||||
os.remove(f"{judul}.zip")
|
||||
f = open(f"{title}.zip", mode='wb').write(dl.content)
|
||||
await callback_query.message.reply_document(f"{title}.zip", caption=f"Title: {res.get('title')}\nIMDb: {res['imdb']}\nAuthor: {res['author_name']}\nRelease Info: ")
|
||||
os.remove(f"{title}.zip")
|
||||
|
|
|
|||
Loading…
Reference in a new issue