From 672e0568d38fa7b4bf5bb18ae95c79220fe40db0 Mon Sep 17 00:00:00 2001 From: DUO Labs Date: Thu, 3 Feb 2022 22:44:41 -0500 Subject: [PATCH] Remove blocked sites from "Images" search bar --- app/filter.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/filter.py b/app/filter.py index a5fe928..61a3384 100644 --- a/app/filter.py +++ b/app/filter.py @@ -363,6 +363,9 @@ class Filter: # get some tags that are unchanged between mobile and pc versions search_input = soup.find_all('td', attrs={'class': "O4cRJf"})[0] + + search_input=BeautifulSoup(re.sub(r'(\s)-site:[a-zA-Z0-9_\.]+', '', + str(search_input)),'lxml') search_options = soup.find_all('div', attrs={'class': "M7pB2"})[0] cor_suggested = soup.find_all('table', attrs={'class': "By0U9"}) next_pages = soup.find_all('table', attrs={'class': "uZgmoc"})[0]