summaryrefslogtreecommitdiff
path: root/searx/engines/xpath.py
diff options
context:
space:
mode:
authorDavid A Roberts <d@vidr.cc>2016-08-14 21:46:54 +1000
committerDavid A Roberts <d@vidr.cc>2016-08-14 22:10:25 +1000
commit1e9dab08e6102383840777e61732fa8e2df78d7c (patch)
tree8a2debcc5e065ce829e1459879581fee73cecfc7 /searx/engines/xpath.py
parent413e143707f9b573d8740cae92152e54df8fdfcd (diff)
downloadsearxng-1e9dab08e6102383840777e61732fa8e2df78d7c.tar.gz
searxng-1e9dab08e6102383840777e61732fa8e2df78d7c.zip
[fix] behaviour for page_size>1 and first_page_num>0
eg. pageno=1,21,41,... instead of 20,40,60,...
Diffstat (limited to 'searx/engines/xpath.py')
-rw-r--r--searx/engines/xpath.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/engines/xpath.py b/searx/engines/xpath.py
index e701c02bf..e5c0c5bea 100644
--- a/searx/engines/xpath.py
+++ b/searx/engines/xpath.py
@@ -87,7 +87,7 @@ def request(query, params):
fp = {'query': query}
if paging and search_url.find('{pageno}') >= 0:
- fp['pageno'] = (params['pageno'] + first_page_num - 1) * page_size
+ fp['pageno'] = (params['pageno'] - 1) * page_size + first_page_num
params['url'] = search_url.format(**fp)
params['query'] = query