diff --git a/app/routes.py b/app/routes.py
index 7e50425..14b2d30 100644
--- a/app/routes.py
+++ b/app/routes.py
@@ -70,11 +70,16 @@ def search():
full_query = url_parse(q) + tbm + start + near
get_body = send_request(SEARCH_URL + full_query, get_ua(user_agent))
- get_body = get_body.replace('>G<', '>Bl<')
+ get_body = get_body.replace('>G<', '>Sh<')
pattern = re.compile('4285f4|ea4335|fbcc05|34a853|fbbc05', re.IGNORECASE)
get_body = pattern.sub('0000ff', get_body)
soup = BeautifulSoup(get_body, 'html.parser')
+
+ ad_divs = soup.find('div', {'id':'main'}).findAll('div', {'class':'ZINbbc'}, recursive=False)
+ for div in ad_divs:
+ div.decompose()
+
for a in soup.find_all('a', href=True):
href = a['href']
if 'url?q=' in href:
diff --git a/app/templates/index.html b/app/templates/index.html
index efb143e..d1353a4 100644
--- a/app/templates/index.html
+++ b/app/templates/index.html
@@ -1,5 +1,5 @@
-
+