mirror of
https://github.com/searxng/searxng.git
synced 2024-05-19 20:08:04 +00:00
Compare commits
4 commits
ab064f01c0
...
c982cee644
Author | SHA1 | Date | |
---|---|---|---|
c982cee644 | |||
0e09014df5 | |||
23bf9f9d95 | |||
2b48584bb4 |
|
@ -42,6 +42,10 @@ buffer-size = 8192
|
||||||
# See https://github.com/searx/searx-docker/issues/24
|
# See https://github.com/searx/searx-docker/issues/24
|
||||||
add-header = Connection: close
|
add-header = Connection: close
|
||||||
|
|
||||||
|
# Follow SIGTERM convention
|
||||||
|
# See https://github.com/searxng/searxng/issues/3427
|
||||||
|
die-on-term
|
||||||
|
|
||||||
# uwsgi serves the static files
|
# uwsgi serves the static files
|
||||||
static-map = /static=/usr/local/searxng/searx/static
|
static-map = /static=/usr/local/searxng/searx/static
|
||||||
# expires set to one day
|
# expires set to one day
|
||||||
|
|
|
@ -95,18 +95,25 @@ def request(query, params):
|
||||||
# don't ask why it is only sometimes / its M$ and they have never been
|
# don't ask why it is only sometimes / its M$ and they have never been
|
||||||
# deterministic ;)
|
# deterministic ;)
|
||||||
'pq': query,
|
'pq': query,
|
||||||
|
# TODO: Figure out how below parameters are populated
|
||||||
|
'sc': '0-0',
|
||||||
|
"sp": "-1",
|
||||||
|
"lq": "0",
|
||||||
|
"qs": "n",
|
||||||
|
"ghsh": "0",
|
||||||
|
"ghacc": "0",
|
||||||
|
"ghpl": "",
|
||||||
}
|
}
|
||||||
|
|
||||||
# To get correct page, arg first and this arg FORM is needed, the value PERE
|
# To get correct page, arg first and this arg FORM is needed, the value PERE
|
||||||
# is on page 2, on page 3 its PERE1 and on page 4 its PERE2 .. and so forth.
|
# is on page 2, on page 3 its PERE1 and on page 4 its PERE2 .. and so forth.
|
||||||
# The 'first' arg should never send on page 1.
|
# The 'first' arg should never send on page 1.
|
||||||
|
|
||||||
if page > 1:
|
if page > 1:
|
||||||
query_params['first'] = _page_offset(page) # see also arg FORM
|
query_params['first'] = _page_offset(page) # see also arg FORM
|
||||||
if page == 2:
|
if page == 2:
|
||||||
query_params['FORM'] = 'PERE'
|
query_params['FORM'] = 'PERE'
|
||||||
elif page > 2:
|
else: # page > 2:
|
||||||
query_params['FORM'] = 'PERE%s' % (page - 2)
|
query_params['FORM'] = 'PERE%s' % (page - 2)
|
||||||
|
|
||||||
params['url'] = f'{base_url}?{urlencode(query_params)}'
|
params['url'] = f'{base_url}?{urlencode(query_params)}'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue