mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-01 18:44:50 +00:00
Fix gomov when no result found
This commit is contained in:
parent
d7cac90473
commit
e916cfe825
1 changed files with 2 additions and 2 deletions
|
|
@ -327,6 +327,8 @@ async def gomov_scrap(_, message):
|
|||
html = await http.get(f"https://185.173.38.216/?s={judul}", headers=headers)
|
||||
soup = BeautifulSoup(html.text, "lxml")
|
||||
entry = soup.find_all(class_="entry-header")
|
||||
if "Nothing Found" in entry[0].text:
|
||||
return await msg.edit("Oops, data film tidak ditemukan di GoMov")
|
||||
DATA = []
|
||||
for i in entry:
|
||||
genre = i.find(class_="gmr-movie-on").text
|
||||
|
|
@ -334,8 +336,6 @@ async def gomov_scrap(_, message):
|
|||
judul = i.find(class_="entry-title").find("a").text
|
||||
link = i.find(class_="entry-title").find("a").get("href")
|
||||
DATA.append({"judul": judul, "link": link, "genre": genre})
|
||||
if not DATA:
|
||||
return await msg.edit("Oops, data film tidak ditemukan di GoMov")
|
||||
res = "".join(
|
||||
f"<b>{num}. {i['judul']}</b>\n<code>{i['genre']}</code>{i['link']}\n\n"
|
||||
for num, i in enumerate(DATA, start=1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue