diff options
Diffstat (limited to 'searx/engines')
| -rw-r--r-- | searx/engines/kickass.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/searx/engines/kickass.py b/searx/engines/kickass.py index 8b89e1f47..8b7e24579 100644 --- a/searx/engines/kickass.py +++ b/searx/engines/kickass.py @@ -20,7 +20,7 @@ categories = ['videos', 'music', 'files'] paging = True # search-url -url = 'https://kickass.so/' +url = 'https://kickass.to/' search_url = url + 'search/{search_term}/{pageno}/' # specific xpath variables @@ -45,6 +45,11 @@ 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 == True: + return results + dom = html.fromstring(resp.text) search_res = dom.xpath('//table[@class="data"]//tr') |