summaryrefslogtreecommitdiff
path: root/searx/engines/flickr.py
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2014-01-30 01:19:51 +0100
committerasciimoo <asciimoo@gmail.com>2014-01-30 01:19:51 +0100
commit89b676ea6faabbcefef3a1044474d0d04c04fd06 (patch)
tree00a94590b99172480fa8908a410e9de9e210605c /searx/engines/flickr.py
parent012c8517e0ca035d2b1783985b0b27f463dae6ee (diff)
downloadsearxng-89b676ea6faabbcefef3a1044474d0d04c04fd06.tar.gz
searxng-89b676ea6faabbcefef3a1044474d0d04c04fd06.zip
[enh] paging support for flickr
Diffstat (limited to 'searx/engines/flickr.py')
-rw-r--r--searx/engines/flickr.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/searx/engines/flickr.py b/searx/engines/flickr.py
index d9554b99a..cb52a0375 100644
--- a/searx/engines/flickr.py
+++ b/searx/engines/flickr.py
@@ -6,13 +6,18 @@ from urlparse import urljoin
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/'
-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
+paging = True
+
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