From 23b9095cbf2d31a1495ee3d63a55bd81548cd367 Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Mon, 24 Aug 2015 11:28:55 +0200 Subject: [fix] improve result handling of startpage engine --- searx/engines/startpage.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'searx/engines') diff --git a/searx/engines/startpage.py b/searx/engines/startpage.py index 9d5b4befe..08e4f7a5b 100644 --- a/searx/engines/startpage.py +++ b/searx/engines/startpage.py @@ -66,7 +66,11 @@ def response(resp): url = link.attrib.get('href') # block google-ad url's - if re.match("^http(s|)://www.google.[a-z]+/aclk.*$", url): + if re.match("^http(s|)://(www\.)?google\.[a-z]+/aclk.*$", url): + continue + + # block startpage search url's + if re.match("^http(s|)://(www\.)?startpage\.com/do/search\?.*$", url): continue title = escape(extract_text(link)) -- cgit v1.2.3 From 996c96fffff328497c2ba305c61e064256c84188 Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Mon, 24 Aug 2015 11:31:30 +0200 Subject: [fix] block ixquick search url's --- searx/engines/startpage.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'searx/engines') diff --git a/searx/engines/startpage.py b/searx/engines/startpage.py index 08e4f7a5b..7d58f7f01 100644 --- a/searx/engines/startpage.py +++ b/searx/engines/startpage.py @@ -73,6 +73,10 @@ def response(resp): if re.match("^http(s|)://(www\.)?startpage\.com/do/search\?.*$", url): continue + # block ixquick search url's + if re.match("^http(s|)://(www\.)?ixquick\.com/do/search\?.*$", url): + continue + title = escape(extract_text(link)) if result.xpath('./p[@class="desc"]'): -- cgit v1.2.3