forked from Icycoide/searxng
[enh] Initial no paging support for Yep.com
Upstream example query: https://yep.com/web?q=test https://yep.com/about
This commit is contained in:
parent
59ef9b9287
commit
fd9a13a3e5
2 changed files with 32 additions and 0 deletions
|
@ -16,6 +16,11 @@ paging = False
|
|||
suggestion_query = ''
|
||||
results_query = ''
|
||||
|
||||
cookies = {}
|
||||
headers = {}
|
||||
'''Some engines might offer different result based on cookies or headers.
|
||||
Possible use-case: To set safesearch cookie or header to moderate.'''
|
||||
|
||||
# parameters for engines with paging support
|
||||
#
|
||||
# number of results on each page
|
||||
|
@ -88,6 +93,9 @@ def request(query, params):
|
|||
if paging and search_url.find('{pageno}') >= 0:
|
||||
fp['pageno'] = (params['pageno'] - 1) * page_size + first_page_num
|
||||
|
||||
params['cookies'].update(cookies)
|
||||
params['headers'].update(headers)
|
||||
|
||||
params['url'] = search_url.format(**fp)
|
||||
params['query'] = query
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue