diff options
author | Léo Bourrel <leo.bourrel@epitech.eu> | 2019-01-28 11:02:43 +0100 |
---|---|---|
committer | Léo Bourrel <leo.bourrel@epitech.eu> | 2019-01-28 11:02:43 +0100 |
commit | bf4a38ad66445dfb6be10d0cbb884ab23421519c (patch) | |
tree | 3889c7c9323ada1292aaa3566e660eaae09aef2c /searx/engines | |
parent | c4f165477ec21e28868ec11b4c165dcd672c3ebd (diff) | |
download | searxng-bf4a38ad66445dfb6be10d0cbb884ab23421519c.tar.gz searxng-bf4a38ad66445dfb6be10d0cbb884ab23421519c.zip |
Remove asksteem
Diffstat (limited to 'searx/engines')
-rw-r--r-- | searx/engines/asksteem.py | 44 |
1 files changed, 0 insertions, 44 deletions
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 |