mirror of
https://github.com/searxng/searxng.git
synced 2025-08-03 18:42:33 +02:00
commit
ec2516b93d
2 changed files with 9 additions and 4 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue