mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-03 11:04:51 +00:00
Update scrapwebsite.py
This commit is contained in:
parent
86ed7df2ab
commit
6011229bcf
1 changed files with 5 additions and 4 deletions
|
|
@ -125,9 +125,10 @@ async def movikucc(_, message):
|
||||||
@app.on_message(filters.command(["savefilm21"], COMMAND_HANDLER))
|
@app.on_message(filters.command(["savefilm21"], COMMAND_HANDLER))
|
||||||
@capture_err
|
@capture_err
|
||||||
async def savefilm21(_, message):
|
async def savefilm21(_, message):
|
||||||
if len(message.command) == 1:
|
try:
|
||||||
return await message.reply("Masukkan query yang akan dicari..!!")
|
judul = message.text.split(" ", maxsplit=1)[1]
|
||||||
judul = message.text.split(" ", maxsplit=1)[1]
|
except IndexError:
|
||||||
|
judul = ""
|
||||||
msg = await message.reply("Sedang proses scrap, mohon tunggu..")
|
msg = await message.reply("Sedang proses scrap, mohon tunggu..")
|
||||||
try:
|
try:
|
||||||
headers = {
|
headers = {
|
||||||
|
|
@ -135,7 +136,7 @@ async def savefilm21(_, message):
|
||||||
}
|
}
|
||||||
|
|
||||||
html = await http.get(
|
html = await http.get(
|
||||||
f"http://38.242.196.210/?s={judul}", headers=headers, follow_redirects=False
|
f"http://185.99.135.215/?s={judul}", headers=headers, follow_redirects=False
|
||||||
)
|
)
|
||||||
soup = BeautifulSoup(html.text, "lxml")
|
soup = BeautifulSoup(html.text, "lxml")
|
||||||
res = soup.find_all(class_="entry-title")
|
res = soup.find_all(class_="entry-title")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue