From 9ff500181624e996febb60bf4f6378fc749f7f9a Mon Sep 17 00:00:00 2001 From: Dalf Date: Mon, 5 Aug 2019 15:43:01 +0200 Subject: [PATCH] [fix] arxiv engine --- searx/engines/arxiv.py | 2 +- tests/unit/engines/test_arxiv.py | 2 +- 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)