on master help sign in
[fix] temporary disable googles inner links - #491
commit09b7673fbd271349b6878959bd2e1ae846981e13 authorAdam Tauber <asciimoo@gmail.com> dateMon 18 Jan 2016, 13:08 (11 years ago) parentbd22e9a
1 file changed+23−23
searx/engines/google.py+23−23
searx/engines/google.py+23−23
@@ -209,29 +209,29 @@ def response(resp):
209209 parsed_url = urlparse(url, google_hostname)
210210
211211 # map result
212− if ((parsed_url.netloc == google_hostname and parsed_url.path.startswith(maps_path))
213− or (parsed_url.netloc.startswith(map_hostname_start))):
214− x = result.xpath(map_near)
215− if len(x) > 0:
216− # map : near the location
217− results = results + parse_map_near(parsed_url, x, google_hostname)
218− else:
219− # map : detail about a location
220− results = results + parse_map_detail(parsed_url, result, google_hostname)
221−
222− # google news
223− elif (parsed_url.netloc == google_hostname
224− and parsed_url.path == search_path):
225− # skipping news results
226− pass
227−
228− # images result
229− elif (parsed_url.netloc == google_hostname
230− and parsed_url.path == images_path):
231− # only thumbnail image provided,
232− # so skipping image results
233− # results = results + parse_images(result, google_hostname)
234− pass
212+ if parsed_url.netloc == google_hostname:
213+ # TODO fix inside links
214+ continue
215+ # if parsed_url.path.startswith(maps_path) or parsed_url.netloc.startswith(map_hostname_start):
216+ # print "yooooo"*30
217+ # x = result.xpath(map_near)
218+ # if len(x) > 0:
219+ # # map : near the location
220+ # results = results + parse_map_near(parsed_url, x, google_hostname)
221+ # else:
222+ # # map : detail about a location
223+ # results = results + parse_map_detail(parsed_url, result, google_hostname)
224+ # # google news
225+ # elif parsed_url.path == search_path:
226+ # # skipping news results
227+ # pass
228+
229+ # # images result
230+ # elif parsed_url.path == images_path:
231+ # # only thumbnail image provided,
232+ # # so skipping image results
233+ # # results = results + parse_images(result, google_hostname)
234+ # pass
235235
236236 else:
237237 # normal result