Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
weebzone authored Nov 21, 2022
1 parent 7de6d57 commit 474e93b
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 @@ -153,7 +153,7 @@ def scrapper(update, context):
soup = BeautifulSoup (r, "html.parser")
for a in soup.find_all("a"):
c = a.get("href")
if "shortingly" in c:
if c and "shortingly" in c:
link = c
g = rock(link)
t = client.get(g).text
Expand All @@ -167,11 +167,11 @@ def scrapper(update, context):
soup = BeautifulSoup (r, "html.parser")
for a in soup.find_all("a"):
c= a.get("href")
if "redirect/main.php?" in c:
if c and "redirect/main.php?" in c:
download = get(c, stream=True, allow_redirects=False)
link = download.headers["location"]
g = rock(link)
if "gdtot" in g:
if g and "gdtot" in g:
t = client.get(g).text
soupt = BeautifulSoup(t, "html.parser")
title = soupt.title
Expand Down

0 comments on commit 474e93b

Please sign in to comment.