From e8734b37c9b3c2f598bb309e04d646bc8e6420a8 Mon Sep 17 00:00:00 2001 From: Venca24 Date: Fri, 18 Jan 2019 09:04:40 +0100 Subject: [PATCH 1/2] [FIX] image_proxify --- searx/webapp.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/searx/webapp.py b/searx/webapp.py index 977e7e67..72725977 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -295,6 +295,9 @@ def image_proxify(url): if not request.preferences.get_value('image_proxy'): return url + if url.startswith('data:image/jpeg;base64,'): + return url + if settings.get('result_proxy'): return proxify(url) 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 2/2] 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 6738780f..00000000 --- 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 f4d6e537..ff7782b6 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