Browse Source

[fix] temporary disable googles inner links - #491

Adam Tauber 9 years ago
parent
commit
09b7673fbd
1 changed files with 23 additions and 23 deletions
  1. 23
    23
      searx/engines/google.py

+ 23
- 23
searx/engines/google.py View File

@@ -209,29 +209,29 @@ def response(resp):
209 209
             parsed_url = urlparse(url, google_hostname)
210 210
 
211 211
             # 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
235 235
 
236 236
             else:
237 237
                 # normal result