summaryrefslogtreecommitdiff
path: root/searx/engines
diff options
context:
space:
mode:
authorDalf <alex@al-f.net>2015-06-06 00:18:00 +0200
committerDalf <alex@al-f.net>2015-06-06 00:18:00 +0200
commitfc0ae0f9073b36912a4302c6285f87331c045415 (patch)
tree9a8a6e48cdc8790211834318d738f3281fd04c24 /searx/engines
parent72c8de35a29f3c58785282d8ca23e33506e01122 (diff)
downloadsearxng-fc0ae0f9073b36912a4302c6285f87331c045415.tar.gz
searxng-fc0ae0f9073b36912a4302c6285f87331c045415.zip
google engine: code cleanup
Diffstat (limited to 'searx/engines')
-rw-r--r--searx/engines/google.py22
1 files changed, 3 insertions, 19 deletions
diff --git a/searx/engines/google.py b/searx/engines/google.py
index 6b822b920..0e78a9e2c 100644
--- a/searx/engines/google.py
+++ b/searx/engines/google.py
@@ -124,9 +124,6 @@ image_img_src_xpath = './img/@src'
# FIXME : no translation
property_address = "Address"
property_phone = "Phone number"
-property_location = "Location"
-property_website = "Web site"
-property_gplus_website = "Google plus"
# cookies
pref_cookie = ''
@@ -166,19 +163,6 @@ def parse_url(url_string, google_hostname):
return url_string
-# URL : get label
-def url_get_label(url_string):
- # sanity check
- if url_string is None:
- return url_string
-
- # normal case
- parsed_url = urlparse(url_string)
- if parsed_url.netloc == 'plus.google.com':
- return property_gplus_website
- return property_website
-
-
# returns extract_text on the first result selected by the xpath or None
def extract_text_from_dom(result, xpath):
r = result.xpath(xpath)
@@ -281,9 +265,9 @@ def response(resp):
# append result
results.append({'url': url,
'title': title,
- 'content': content})
- except Exception, e:
- print e
+ 'content': content
+ })
+ except:
continue
# parse suggestion