summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalf <alex@al-f.net>2019-08-05 15:43:01 +0200
committerDalf <alex@al-f.net>2019-08-05 15:43:01 +0200
commit9ff500181624e996febb60bf4f6378fc749f7f9a (patch)
treed824897fd5408f4f5cf36c9fa68a1b5686703d18
parent91a59ff3502803611953820e2923348440f807d0 (diff)
downloadsearxng-9ff500181624e996febb60bf4f6378fc749f7f9a.tar.gz
searxng-9ff500181624e996febb60bf4f6378fc749f7f9a.zip
[fix] arxiv engine
-rw-r--r--searx/engines/arxiv.py2
-rw-r--r--tests/unit/engines/test_arxiv.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/searx/engines/arxiv.py b/searx/engines/arxiv.py
index 5ef84f0c1..182861892 100644
--- a/searx/engines/arxiv.py
+++ b/searx/engines/arxiv.py
@@ -29,7 +29,7 @@ def request(query, params):
# basic search
offset = (params['pageno'] - 1) * number_of_results
- string_args = dict(query=query,
+ string_args = dict(query=query.decode('utf-8'),
offset=offset,
number_of_results=number_of_results)
diff --git a/tests/unit/engines/test_arxiv.py b/tests/unit/engines/test_arxiv.py
index b32c0e605..83c4f8595 100644
--- a/tests/unit/engines/test_arxiv.py
+++ b/tests/unit/engines/test_arxiv.py
@@ -8,7 +8,7 @@ from searx.testing import SearxTestCase
class TestBaseEngine(SearxTestCase):
def test_request(self):
- query = 'test_query'
+ query = 'test_query'.encode('utf-8')
dicto = defaultdict(dict)
dicto['pageno'] = 1
params = arxiv.request(query, dicto)