From 4b785677d84b050053ad337a702a73ea2270e75b Mon Sep 17 00:00:00 2001 From: Israel Yago Pereira Date: Tue, 2 Nov 2021 13:41:20 -0300 Subject: [PATCH] Onesearch pagination --- searx/engines/onesearch.py | 6 ++++-- searx/settings.yml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/searx/engines/onesearch.py b/searx/engines/onesearch.py index 7e2f2913..17a009c2 100644 --- a/searx/engines/onesearch.py +++ b/searx/engines/onesearch.py @@ -24,13 +24,15 @@ about = { # engine dependent config categories = ['general'] +paging = True # search-url -URL = 'https://www.onesearch.com/yhs/search;?p=%s' +URL = 'https://www.onesearch.com/yhs/search;?p=%s&b=%d' def request(query, params): - params['url'] = URL % query + starting_from = (params['pageno'] * 10) - 9 + params['url'] = URL % (query, starting_from) return params diff --git a/searx/settings.yml b/searx/settings.yml index 7c7d4620..164ad9cf 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -1624,7 +1624,7 @@ engines: - name: onesearch shortcut: onesearch engine: onesearch - paging: false + paging: true categories: general about: website: https://www.onesearch.com/