mirror of https://github.com/searxng/searxng.git
[enh] paging support for flickr
This commit is contained in:
parent
012c8517e0
commit
89b676ea6f
|
@ -6,13 +6,18 @@ from urlparse import urljoin
|
||||||
|
|
||||||
categories = ['images']
|
categories = ['images']
|
||||||
|
|
||||||
|
#https://secure.flickr.com/search?data=1&q=asdf&s=&page=3&mt=&cm=&m=&l=&w=&hd=&d=&append=1
|
||||||
|
|
||||||
url = 'https://secure.flickr.com/'
|
url = 'https://secure.flickr.com/'
|
||||||
search_url = url+'search/?{query}'
|
search_url = url+'search/?{query}&page={page}'
|
||||||
results_xpath = '//div[@id="thumbnails"]//a[@class="rapidnofollow photo-click" and @data-track="photo-click"]' # noqa
|
results_xpath = '//div[@id="thumbnails"]//a[@class="rapidnofollow photo-click" and @data-track="photo-click"]' # noqa
|
||||||
|
|
||||||
|
paging = True
|
||||||
|
|
||||||
|
|
||||||
def request(query, params):
|
def request(query, params):
|
||||||
params['url'] = search_url.format(query=urlencode({'q': query}))
|
params['url'] = search_url.format(query=urlencode({'q': query}),
|
||||||
|
page=params['pageno'])
|
||||||
return params
|
return params
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue