mirror of
https://github.com/searxng/searxng.git
synced 2024-11-20 03:10:10 +01:00
[enh] paging support for stackoverflow
This commit is contained in:
parent
6cbf9bf67d
commit
7de506bbcd
@ -6,12 +6,15 @@ from urllib import urlencode
|
|||||||
categories = ['it']
|
categories = ['it']
|
||||||
|
|
||||||
url = 'http://stackoverflow.com/'
|
url = 'http://stackoverflow.com/'
|
||||||
search_url = url+'search?'
|
search_url = url+'search?{query}&page={pageno}'
|
||||||
result_xpath = './/div[@class="excerpt"]//text()'
|
result_xpath = './/div[@class="excerpt"]//text()'
|
||||||
|
|
||||||
|
paging = True
|
||||||
|
|
||||||
|
|
||||||
def request(query, params):
|
def request(query, params):
|
||||||
params['url'] = search_url + urlencode({'q': query})
|
params['url'] = search_url.format(query=urlencode({'q': query}),
|
||||||
|
pageno=params['pageno'])
|
||||||
return params
|
return params
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user