diff options
| author | Adam Tauber <asciimoo@gmail.com> | 2015-05-02 14:58:32 -0400 |
|---|---|---|
| committer | Adam Tauber <asciimoo@gmail.com> | 2015-05-02 14:58:32 -0400 |
| commit | 93fd1e4c76b2eb3d219a8b146ae9e36b103ae5cf (patch) | |
| tree | af2c5d2f48c4f11a79560f0f9f884209ad580617 /searx/engines/flickr.py | |
| parent | 81850dd603631b7e4b0d3b22d85e9eb3ae5b1e58 (diff) | |
| parent | 4689fe341ca7c7231d0409526b9ee0f2eadde445 (diff) | |
Merge pull request #308 from dalf/versions_upgrade
update versions.cfg to use the current up-to-date packages
Diffstat (limited to 'searx/engines/flickr.py')
| -rw-r--r-- | searx/engines/flickr.py | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/searx/engines/flickr.py b/searx/engines/flickr.py index 4040236e1..68d45bc17 100644 --- a/searx/engines/flickr.py +++ b/searx/engines/flickr.py @@ -1,15 +1,17 @@ #!/usr/bin/env python -## Flickr (Images) -# -# @website https://www.flickr.com -# @provide-api yes (https://secure.flickr.com/services/api/flickr.photos.search.html) -# -# @using-api yes -# @results JSON -# @stable yes -# @parse url, title, thumbnail, img_src -#More info on api-key : https://www.flickr.com/services/apps/create/ +""" + Flickr (Images) + + @website https://www.flickr.com + @provide-api yes (https://secure.flickr.com/services/api/flickr.photos.search.html) + + @using-api yes + @results JSON + @stable yes + @parse url, title, thumbnail, img_src + More info on api-key : https://www.flickr.com/services/apps/create/ +""" from urllib import urlencode from json import loads @@ -48,10 +50,10 @@ def response(resp): search_results = loads(resp.text) # return empty array if there are no results - if not 'photos' in search_results: + if 'photos' not in search_results: return [] - if not 'photo' in search_results['photos']: + if 'photo' not in search_results['photos']: return [] photos = search_results['photos']['photo'] |