@@ -107,13 +107,12 @@ images_path = '/images'
107107supported_languages_url = 'https://www.google.com/preferences?#languages'
108108
109109# specific xpath variables
110−results_xpath = '//div[@class="g"]'
111−url_xpath = './/h3/a/@href'
112−title_xpath = './/h3'
113−content_xpath = './/span[@class="st"]'
114−content_misc_xpath = './/div[@class="f slp"]'
115−suggestion_xpath = '//p[@class="_Bmc"]'
116−spelling_suggestion_xpath = '//a[@class="spell"]'
110+results_xpath = '//div[contains(@class, "ZINbbc")]'
111+url_xpath = './/div[@class="kCrYT"][1]/a/@href'
112+title_xpath = './/div[@class="kCrYT"][1]/a/div[1]'
113+content_xpath = './/div[@class="kCrYT"][2]//div[contains(@class, "BNeawe")]//div[contains(@class, "BNeawe")]'
114+suggestion_xpath = '//div[contains(@class, "ZINbbc")][last()]//div[@class="rVLSBd"]/a//div[contains(@class, "BNeawe")]'
115+spelling_suggestion_xpath = '//div[@id="scc"]//a'
117116
118117# map : detail location
119118map_address_xpath = './/div[@class="s"]//table//td[2]/span/text()'
@@ -199,10 +198,6 @@ def request(query, params):
199198 params['headers']['Accept-Language'] = language + ',' + language + '-' + country
200199 params['headers']['Accept'] = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
201200
202− # Force Safari 3.1 on Mac OS X (Leopard) user agent to avoid loading the new UI that Searx can't parse
203− params['headers']['User-Agent'] = ("Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4)"
204− "AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1")
205−
206201 params['google_hostname'] = google_hostname
207202
208203 return params
@@ -274,9 +269,7 @@ def response(resp):
274269 content = extract_text_from_dom(result, content_xpath)
275270 if content is None:
276271 continue
277− content_misc = extract_text_from_dom(result, content_misc_xpath)
278− if content_misc is not None:
279− content = content_misc + "<br />" + content
272+
280273 # append result
281274 results.append({'url': url,
282275 'title': title,