mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-09 05:04:50 +00:00
Update scrapwebsite.py
This commit is contained in:
parent
030133c9d6
commit
6f2f14d427
1 changed files with 2 additions and 0 deletions
|
|
@ -175,6 +175,8 @@ async def pahe_scrap(_, message):
|
||||||
pesan = await message.reply("Please wait, scraping data..")
|
pesan = await message.reply("Please wait, scraping data..")
|
||||||
r = await http.get(f"https://yasirapi.eu.org/pahe?q={judul}")
|
r = await http.get(f"https://yasirapi.eu.org/pahe?q={judul}")
|
||||||
res = r.json()
|
res = r.json()
|
||||||
|
if not res["result"]:
|
||||||
|
return await pesan.edit("Yahh, no result found.")
|
||||||
data = "".join(f"**{count}. {i['judul']}**\n{i['link']}\n\n" for count, i in enumerate(res["result"], start=1))
|
data = "".join(f"**{count}. {i['judul']}**\n{i['link']}\n\n" for count, i in enumerate(res["result"], start=1))
|
||||||
try:
|
try:
|
||||||
await pesan.edit(
|
await pesan.edit(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue