mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 17:44:50 +00:00
Fix scraper
This commit is contained in:
parent
365f1b9eec
commit
5a4c5f1a3c
1 changed files with 5 additions and 2 deletions
|
|
@ -16,7 +16,7 @@ import httpx
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
from cachetools import TTLCache
|
from cachetools import TTLCache
|
||||||
from pykeyboard import InlineButton, InlineKeyboard
|
from pykeyboard import InlineButton, InlineKeyboard
|
||||||
from pyrogram.errors import QueryIdInvalid
|
from pyrogram.errors import MessageTooLong, QueryIdInvalid
|
||||||
from pyrogram.types import Message
|
from pyrogram.types import Message
|
||||||
|
|
||||||
from database import dbname
|
from database import dbname
|
||||||
|
|
@ -1463,7 +1463,10 @@ async def muviku_scrap(_, message, strings):
|
||||||
res = "".join(
|
res = "".join(
|
||||||
f"<b>Host: {i['kualitas']}</b>\n{i['link']}\n\n" for i in data
|
f"<b>Host: {i['kualitas']}</b>\n{i['link']}\n\n" for i in data
|
||||||
)
|
)
|
||||||
await message.reply(res)
|
await message.reply_msg(res)
|
||||||
|
except MessageTooLong:
|
||||||
|
url = await post_to_telegraph(False, link, res)
|
||||||
|
await message.reply_msg(f"Your result is too long, i have pasted your result on Telegraph:\n{url}")
|
||||||
except IndexError:
|
except IndexError:
|
||||||
return await message.reply(
|
return await message.reply(
|
||||||
strings("invalid_cmd_scrape").format(cmd=message.command[0])
|
strings("invalid_cmd_scrape").format(cmd=message.command[0])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue