Try fix for tv

This commit is contained in:
yasirarism 2023-09-25 21:38:46 +07:00 committed by GitHub
parent 63e47123af
commit 669ff6c0f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1409,6 +1409,15 @@ async def nodrakorddl_scrap(_, callback_query, strings):
try:
html = await fetch.get(link)
soup = BeautifulSoup(html.text, "lxml")
if "/tv/" in link:
result = soup.find("div", {"entry-content entry-content-single"}).find_all("p")
msg = ""
for i in result:
msg += str(f"{i}\n")
link = await post_to_telegraph(False, "MissKaty NoDrakor", msg)
return await callback_query.message.edit_msg(
strings("res_scrape").format(link=link, kl=link), reply_markup=keyboard
)
res = soup.find_all(class_="button button-shadow")
res = "".join(f"{i.text}\n{i['href']}\n\n" for i in res)
await callback_query.message.edit_msg(