forked from Ponysearch/Ponysearch
[enh] paging support for stackoverflow
This commit is contained in:
parent
6cbf9bf67d
commit
7de506bbcd
1 changed files with 5 additions and 2 deletions
|
@ -6,12 +6,15 @@ from urllib import urlencode
|
|||
categories = ['it']
|
||||
|
||||
url = 'http://stackoverflow.com/'
|
||||
search_url = url+'search?'
|
||||
search_url = url+'search?{query}&page={pageno}'
|
||||
result_xpath = './/div[@class="excerpt"]//text()'
|
||||
|
||||
paging = True
|
||||
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue