This commit is contained in:
Yasir Aris M 2024-09-24 10:37:57 +07:00 committed by GitHub
parent 722695e725
commit 5616f17bb4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -249,7 +249,7 @@ async def getDataMovieku(msg, kueri, CurrentPage, user, strings):
await msg.edit_msg( await msg.edit_msg(
f"ERROR: Failed to fetch data from {exc.request.url} - <code>{exc}</code>" f"ERROR: Failed to fetch data from {exc.request.url} - <code>{exc}</code>"
) )
return None, None return None, 0, None
r = BeautifulSoup(data, "lxml") r = BeautifulSoup(data, "lxml")
res = r.find_all(class_="bx") res = r.find_all(class_="bx")
for i in res: for i in res:
@ -260,7 +260,7 @@ async def getDataMovieku(msg, kueri, CurrentPage, user, strings):
moviekudata.append({"judul": judul, "link": link, "type": typee}) moviekudata.append({"judul": judul, "link": link, "type": typee})
if not moviekudata: if not moviekudata:
await msg.edit_msg(strings("no_result"), del_in=5) await msg.edit_msg(strings("no_result"), del_in=5)
return None, None return None, 0, None
SCRAP_DICT.add(msg.id, [split_arr(moviekudata, 6), kueri], timeout=1800) SCRAP_DICT.add(msg.id, [split_arr(moviekudata, 6), kueri], timeout=1800)
index = int(CurrentPage - 1) index = int(CurrentPage - 1)
PageLen = len(SCRAP_DICT[msg.id][0]) PageLen = len(SCRAP_DICT[msg.id][0])