Merge pull request #233 from dalf/master

[fix] kickass engine
This commit is contained in:
Adam Tauber 2015-02-12 15:20:17 +01:00
commit ec2516b93d
2 changed files with 9 additions and 4 deletions

View file

@ -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 is True:
return results
dom = html.fromstring(resp.text)
search_res = dom.xpath('//table[@class="data"]//tr')