From bf4a38ad66445dfb6be10d0cbb884ab23421519c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Bourrel?= Date: Mon, 28 Jan 2019 11:02:43 +0100 Subject: [PATCH] Remove asksteem --- searx/engines/asksteem.py | 44 --------------------------------------- searx/settings.yml | 4 ---- 2 files changed, 48 deletions(-) delete mode 100644 searx/engines/asksteem.py diff --git a/searx/engines/asksteem.py b/searx/engines/asksteem.py deleted file mode 100644 index 6738780fa..000000000 --- a/searx/engines/asksteem.py +++ /dev/null @@ -1,44 +0,0 @@ -""" - Asksteem (general) - - @website https://asksteem.com/ - @provide-api yes - - @using-api yes - @results JSON (https://github.com/Hoxly/asksteem-docs/wiki) - @stable yes - @parse url, title, content -""" - -from json import loads -from searx.url_utils import urlencode - -# engine dependent config -categories = ['general'] -paging = True -language_support = False -disabled = True - -# search-url -search_url = 'https://api.asksteem.com/search?{params}' -result_url = 'https://steemit.com/@{author}/{title}' - - -# do search-request -def request(query, params): - url = search_url.format(params=urlencode({'q': query, 'pg': params['pageno']})) - params['url'] = url - return params - - -# get response from search-request -def response(resp): - json = loads(resp.text) - - results = [] - - for result in json.get('results', []): - results.append({'url': result_url.format(author=result['author'], title=result['permlink']), - 'title': result['title'], - 'content': result['summary']}) - return results diff --git a/searx/settings.yml b/searx/settings.yml index f4d6e537c..ff7782b65 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -70,10 +70,6 @@ engines: categories : science timeout : 4.0 - - name : asksteem - engine : asksteem - shortcut : as - - name : base engine : base shortcut : bs