logo

searx

My custom branche(s) on searx, a meta-search engine
commit: 7de506bbcd054d3c83c909fd85746cdc8fd86588
parent: 6cbf9bf67d540b0d753fb1c500959825f92d528b
Author: asciimoo <asciimoo@gmail.com>
Date:   Thu, 30 Jan 2014 01:55:49 +0100

[enh] paging support for stackoverflow

Diffstat:

Msearx/engines/stackoverflow.py7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 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