summaryrefslogtreecommitdiff
path: root/searx/engines/google.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/engines/google.py')
-rw-r--r--searx/engines/google.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/searx/engines/google.py b/searx/engines/google.py
index ea93bc94f..a02b6940e 100644
--- a/searx/engines/google.py
+++ b/searx/engines/google.py
@@ -9,7 +9,6 @@
# @parse url, title, content, suggestion
import re
-from cgi import escape
from urllib import urlencode
from urlparse import urlparse, parse_qsl
from lxml import html, etree
@@ -96,7 +95,8 @@ search_url = ('https://{hostname}' +
time_range_search = "&tbs=qdr:{range}"
time_range_dict = {'day': 'd',
'week': 'w',
- 'month': 'm'}
+ 'month': 'm',
+ 'year': 'y'}
# other URLs
map_hostname_start = 'maps.google.'
@@ -155,7 +155,7 @@ def parse_url(url_string, google_hostname):
def extract_text_from_dom(result, xpath):
r = result.xpath(xpath)
if len(r) > 0:
- return escape(extract_text(r[0]))
+ return extract_text(r[0])
return None
@@ -264,7 +264,7 @@ def response(resp):
# parse suggestion
for suggestion in dom.xpath(suggestion_xpath):
# append suggestion
- results.append({'suggestion': escape(extract_text(suggestion))})
+ results.append({'suggestion': extract_text(suggestion)})
# return results
return results