Skip to content

Commit

Permalink
new ui
Browse files Browse the repository at this point in the history
  • Loading branch information
weebzone authored Nov 12, 2022
1 parent 7bbfcbd commit 4e46b97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bot/modules/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,17 @@ def scrapper(update, context):
if str(next_s).strip():
List = next_s.split()
if re.match(r'^(480p|720p|1080p)(.+)? Links:\Z', next_s):
gd_txt += (next_s.replace('Links:', "GDToT Links :")+'\n')
gd_txt += f'<b>{next_s.replace("Links:", "GDToT Links :")}</b>\n\n'
for s in List:
ns = re.sub(r'\(|\)', '', s)
if re.match(r'https?://.+\.gdtot\.\S+', ns):
r = rget(ns)
soup = BeautifulSoup(r.content, "html.parser")
title = soup.title
gd_txt += (f"{(title.text).replace('GDToT | ' , '')}\n{ns}\n\n")
gd_txt += f"<code>{(title.text).replace('GDToT | ' , '')}</code>\n{ns}\n\n"
elif re.match(r'https?://pastetot\.\S+', ns):
nxt = re.sub(r'\(|\)|(https?://pastetot\.\S+)', '', next_s)
gd_txt += (f"\n{nxt}\n{ns}")
gd_txt += f"\n<code>{nxt}</code>\n{ns}\n"
if len(gd_txt) > 4000:
sendMessage(gd_txt, context.bot, update.message)
gd_txt = ""
Expand Down

0 comments on commit 4e46b97

Please sign in to comment.