diff options
author | asciimoo <asciimoo@gmail.com> | 2014-02-18 16:14:31 +0100 |
---|---|---|
committer | asciimoo <asciimoo@gmail.com> | 2014-02-18 16:14:31 +0100 |
commit | 7db4558de707d62e85ab8b68fa4198d92cf537d7 (patch) | |
tree | ea44681f5c8395efa930dd508e810805742407d5 /searx | |
parent | 6f86b96a3536d9c99654e5be261437a4ed519ee8 (diff) | |
download | searxng-7db4558de707d62e85ab8b68fa4198d92cf537d7.tar.gz searxng-7db4558de707d62e85ab8b68fa4198d92cf537d7.zip |
[mod][fix] startpage engine updates
Diffstat (limited to 'searx')
-rw-r--r-- | searx/engines/startpage.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/searx/engines/startpage.py b/searx/engines/startpage.py index cbafe0976..f5a652317 100644 --- a/searx/engines/startpage.py +++ b/searx/engines/startpage.py @@ -29,9 +29,12 @@ def response(resp): dom = html.fromstring(resp.content) # ads xpath //div[@id="results"]/div[@id="sponsored"]//div[@class="result"] # not ads: div[@class="result"] are the direct childs of div[@id="results"] - for result in dom.xpath('//div[@id="results"]/div[@class="result"]'): + for result in dom.xpath('//div[@class="result"]'): link = result.xpath('.//h3/a')[0] url = link.attrib.get('href') + if url.startswith('http://www.google.')\ + or url.startswith('https://www.google.'): + continue title = link.text_content() content = '' |