diff options
author | asciimoo <asciimoo@gmail.com> | 2014-01-30 01:55:49 +0100 |
---|---|---|
committer | asciimoo <asciimoo@gmail.com> | 2014-01-30 01:55:49 +0100 |
commit | 7de506bbcd054d3c83c909fd85746cdc8fd86588 (patch) | |
tree | b88151192b6c9fa66c8c683aa7a195351eeb1740 /searx | |
parent | 6cbf9bf67d540b0d753fb1c500959825f92d528b (diff) | |
download | searxng-7de506bbcd054d3c83c909fd85746cdc8fd86588.tar.gz searxng-7de506bbcd054d3c83c909fd85746cdc8fd86588.zip |
[enh] paging support for stackoverflow
Diffstat (limited to 'searx')
-rw-r--r-- | searx/engines/stackoverflow.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/searx/engines/stackoverflow.py b/searx/engines/stackoverflow.py index 35230600f..213597243 100644 --- a/searx/engines/stackoverflow.py +++ b/searx/engines/stackoverflow.py @@ -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 |