mirror of https://github.com/searxng/searxng.git
commit
acfe843ecd
|
@ -81,7 +81,7 @@ def request(query, params):
|
||||||
|
|
||||||
fp = {'query': query}
|
fp = {'query': query}
|
||||||
if paging and search_url.find('{pageno}') >= 0:
|
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['url'] = search_url.format(**fp)
|
||||||
params['query'] = query
|
params['query'] = query
|
||||||
|
|
|
@ -87,7 +87,7 @@ def request(query, params):
|
||||||
|
|
||||||
fp = {'query': query}
|
fp = {'query': query}
|
||||||
if paging and search_url.find('{pageno}') >= 0:
|
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['url'] = search_url.format(**fp)
|
||||||
params['query'] = query
|
params['query'] = query
|
||||||
|
|
|
@ -28,7 +28,7 @@ def compare_urls(url_a, url_b):
|
||||||
else:
|
else:
|
||||||
host_b = url_b.netloc
|
host_b = url_b.netloc
|
||||||
|
|
||||||
if host_a != host_b or url_a.query != url_b.query:
|
if host_a != host_b or url_a.query != url_b.query or url_a.fragment != url_b.fragment:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# remove / from the end of the url if required
|
# remove / from the end of the url if required
|
||||||
|
|
|
@ -281,6 +281,18 @@ engines:
|
||||||
disabled : True
|
disabled : True
|
||||||
shortcut : habr
|
shortcut : habr
|
||||||
|
|
||||||
|
- name : hoogle
|
||||||
|
engine : json_engine
|
||||||
|
paging : True
|
||||||
|
search_url : https://www.haskell.org/hoogle/?mode=json&hoogle={query}&start={pageno}
|
||||||
|
results_query : results
|
||||||
|
url_query : location
|
||||||
|
title_query : self
|
||||||
|
content_query : docs
|
||||||
|
page_size : 20
|
||||||
|
categories : it
|
||||||
|
shortcut : ho
|
||||||
|
|
||||||
- name : ina
|
- name : ina
|
||||||
engine : ina
|
engine : ina
|
||||||
shortcut : in
|
shortcut : in
|
||||||
|
|
Loading…
Reference in New Issue