Skip to content

Commit

Permalink
add another site scraper [Jack]
Browse files Browse the repository at this point in the history
  • Loading branch information
weebzone authored Nov 18, 2022
1 parent 2c7eb94 commit 998e1be
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions bot/modules/scraper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import cloudscraper
import requests
import re
from re import S
from re import match as rematch, findall, sub as resub
Expand Down Expand Up @@ -95,6 +96,19 @@ def scrapper(update, context):
if len(prsd) > 4000:
sent = sendMessage("<i>Scrapping More...</i>", context.bot, update.message)
prsd = ""
elif "teluguflix" in link:
client = requests.session()
r = client.get(link).text
y = r.split('id="download"')[-1]
f = y.split("</ul>") [0]
soup = BeautifulSoup (f, "html.parser")
for a in soup.find_all("a"):
c = a.get("href")
t = client.get(c).text
soupt = BeautifulSoup(t, "html.parser")
title = soupt.title
gd_txt = f"<code>{(title.text).replace('GDToT | ' , '')}</code>\n{c}\n\n"
sendMessage(gd_txt, context.bot, update.message)
elif "cinevood" in link:
prsd = ""
links = []
Expand Down

0 comments on commit 998e1be

Please sign in to comment.