Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Moist-Cat committed Dec 22, 2022
1 parent 7041b43 commit 940cc8b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ dist/

# env
whoogle.env

# vim
*~
*.swp
10 changes: 6 additions & 4 deletions app/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,13 +610,15 @@ def view_image(self, soup) -> BeautifulSoup:

# get some tags that are unchanged between mobile and pc versions
cor_suggested = soup.find_all('table', attrs={'class': "By0U9"})
next_pages = soup.find_all('table', attrs={'class': "uZgmoc"})[0]
next_pages = soup.find('table', attrs={'class': "uZgmoc"})

results = []
# find results div
results_div = soup.find_all('div', attrs={'class': "nQvrDb"})[0]
# find all the results
results_all = results_div.find_all('div', attrs={'class': "lIMUZd"})
results_div = soup.find('div', attrs={'class': "nQvrDb"})
# find all the results (if any)
results_all = []
if results_div:
results_all = results_div.find_all('div', attrs={'class': "lIMUZd"})

for item in results_all:
urls = item.find('a')['href'].split('&imgrefurl=')
Expand Down

0 comments on commit 940cc8b

Please sign in to comment.