commit: 5029cb478755c152bfa7da2f6381cd95cc4ee238
parent ec2516b93db6343afc4bd86291082dfb64914595
Author: dalf <alex@al-f.net>
Date: Fri, 13 Feb 2015 11:17:00 +0100
[fix] close #197 for all engines
Diffstat:
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/searx/engines/kickass.py b/searx/engines/kickass.py
@@ -45,11 +45,6 @@ def request(query, params):
def response(resp):
results = []
- # check if redirect comparing to the True value,
- # because resp can be a Mock object, and any attribut name returns something.
- if resp.is_redirect is True:
- return results
-
dom = html.fromstring(resp.text)
search_res = dom.xpath('//table[@class="data"]//tr')
diff --git a/searx/search.py b/searx/search.py
@@ -87,6 +87,11 @@ def make_callback(engine_name, results_queue, callback, params):
# creating a callback wrapper for the search engine results
def process_callback(response, **kwargs):
+ # check if redirect comparing to the True value,
+ # because resp can be a Mock object, and any attribut name returns something.
+ if response.is_redirect is True:
+ return
+
response.search_params = params
timeout_overhead = 0.2 # seconds