on master help sign in
[fix] temporary disable googles inner links - #491
09b7673Adam Tauber
searx/engines/google.py+23−23
@@ -209,29 +209,29 @@ def response(resp):
209 parsed_url = urlparse(url, google_hostname)
209 parsed_url = urlparse(url, google_hostname)
210
210
211 # map result
211 # map result
212− if ((parsed_url.netloc == google_hostname and parsed_url.path.startswith(maps_path))
212+ if parsed_url.netloc == google_hostname:
213+ # TODO fix inside links
214+ continue
213− or (parsed_url.netloc.startswith(map_hostname_start))):
215+ # if parsed_url.path.startswith(maps_path) or parsed_url.netloc.startswith(map_hostname_start):
216+ # print "yooooo"*30
214− x = result.xpath(map_near)
217+ # x = result.xpath(map_near)
215− if len(x) > 0:
218+ # if len(x) > 0:
216− # map : near the location
219+ # # map : near the location
217− results = results + parse_map_near(parsed_url, x, google_hostname)
220+ # results = results + parse_map_near(parsed_url, x, google_hostname)
218− else:
221+ # else:
219− # map : detail about a location
222+ # # map : detail about a location
220− results = results + parse_map_detail(parsed_url, result, google_hostname)
223+ # results = results + parse_map_detail(parsed_url, result, google_hostname)
221−
222− # google news
224+ # # google news
223− elif (parsed_url.netloc == google_hostname
224− and parsed_url.path == search_path):
225+ # elif parsed_url.path == search_path:
225− # skipping news results
226+ # # skipping news results
226− pass
227+ # pass
227−
228+
228− # images result
229+ # # images result
229− elif (parsed_url.netloc == google_hostname
230− and parsed_url.path == images_path):
230+ # elif parsed_url.path == images_path:
231− # only thumbnail image provided,
231+ # # only thumbnail image provided,
232− # so skipping image results
232+ # # so skipping image results
233− # results = results + parse_images(result, google_hostname)
233+ # # results = results + parse_images(result, google_hostname)
234− pass
234+ # pass
235
235
236 else:
236 else:
237 # normal result
237 # normal result