on master help sign in
[mod][fix] startpage engine updates
commit7db4558de707d62e85ab8b68fa4198d92cf537d7 authorasciimoo <asciimoo@gmail.com> dateTue 18 Feb 2014, 16:14 (13 years ago) parent6f86b96
1 file changed+4−1
searx/engines/startpage.py+4−1
searx/engines/startpage.py+4−1
@@ -29,9 +29,12 @@ def response(resp):
2929 dom = html.fromstring(resp.content)
3030 # ads xpath //div[@id="results"]/div[@id="sponsored"]//div[@class="result"]
3131 # not ads: div[@class="result"] are the direct childs of div[@id="results"]
32− for result in dom.xpath('//div[@id="results"]/div[@class="result"]'):
32+ for result in dom.xpath('//div[@class="result"]'):
3333 link = result.xpath('.//h3/a')[0]
3434 url = link.attrib.get('href')
35+ if url.startswith('http://www.google.')\
36+ or url.startswith('https://www.google.'):
37+ continue
3538 title = link.text_content()
3639
3740 content = ''