mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-09 05:04:50 +00:00
Fix
This commit is contained in:
parent
8bda4f98d9
commit
27ec6138e5
2 changed files with 19 additions and 5 deletions
|
|
@ -0,0 +1,16 @@
|
||||||
|
import asyncio
|
||||||
|
from logging import getLogger
|
||||||
|
|
||||||
|
LOGGER = getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
async def kirimPesan(msg, text: str, reply_markup=None):
|
||||||
|
try:
|
||||||
|
return await msg.reply(text, disable_web_page_preview=True)
|
||||||
|
except FloodWait as e:
|
||||||
|
LOGGER.warning(str(e))
|
||||||
|
await asyncio.sleep(e.value)
|
||||||
|
return await kirimPesan(text)
|
||||||
|
except Exception as e:
|
||||||
|
LOGGER.error(str(e))
|
||||||
|
return
|
||||||
|
|
@ -52,7 +52,7 @@ async def nodrakor(_, msg):
|
||||||
if "Nothing Found" in entry[0].text:
|
if "Nothing Found" in entry[0].text:
|
||||||
await m.delete()
|
await m.delete()
|
||||||
if title != "":
|
if title != "":
|
||||||
await msg.reply(f"404 Not FOUND For: {key}", True)
|
await msg.reply(f"404 Not FOUND For: {title}", True)
|
||||||
else:
|
else:
|
||||||
await msg.reply(f"404 Not FOUND!", True)
|
await msg.reply(f"404 Not FOUND!", True)
|
||||||
return
|
return
|
||||||
|
|
@ -97,9 +97,7 @@ async def ngefilm21(_, message):
|
||||||
|
|
||||||
msg = await message.reply("Sedang proses scrap, mohon tunggu..")
|
msg = await message.reply("Sedang proses scrap, mohon tunggu..")
|
||||||
try:
|
try:
|
||||||
html = await http.get(
|
html = await http.get(f"https://ngefilm.info/search?q={title}", headers=headers)
|
||||||
f"https://ngefilm.info/search?q={title}", headers=headers
|
|
||||||
)
|
|
||||||
soup = BeautifulSoup(html.text, "lxml")
|
soup = BeautifulSoup(html.text, "lxml")
|
||||||
res = soup.find_all("h2")
|
res = soup.find_all("h2")
|
||||||
data = []
|
data = []
|
||||||
|
|
@ -507,7 +505,7 @@ async def gomov_scrap(_, msg):
|
||||||
if "Nothing Found" in entry[0].text:
|
if "Nothing Found" in entry[0].text:
|
||||||
await m.delete()
|
await m.delete()
|
||||||
if title != "":
|
if title != "":
|
||||||
await msg.reply(f"404 Not FOUND For: {key}", True)
|
await msg.reply(f"404 Not FOUND For: {title}", True)
|
||||||
else:
|
else:
|
||||||
await msg.reply(f"404 Not FOUND!", True)
|
await msg.reply(f"404 Not FOUND!", True)
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue