|
|
|
@ -1,14 +1,16 @@
|
|
|
|
|
#!/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 no
|
|
|
|
|
# @results HTML
|
|
|
|
|
# @stable no
|
|
|
|
|
# @parse url, title, thumbnail, img_src
|
|
|
|
|
"""
|
|
|
|
|
Flickr (Images)
|
|
|
|
|
|
|
|
|
|
@website https://www.flickr.com
|
|
|
|
|
@provide-api yes (https://secure.flickr.com/services/api/flickr.photos.search.html)
|
|
|
|
|
|
|
|
|
|
@using-api no
|
|
|
|
|
@results HTML
|
|
|
|
|
@stable no
|
|
|
|
|
@parse url, title, thumbnail, img_src
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
from urllib import urlencode
|
|
|
|
|
from json import loads
|
|
|
|
@ -20,8 +22,8 @@ logger = logger.getChild('flickr-noapi')
|
|
|
|
|
|
|
|
|
|
categories = ['images']
|
|
|
|
|
|
|
|
|
|
url = 'https://secure.flickr.com/'
|
|
|
|
|
search_url = url + 'search/?{query}&page={page}'
|
|
|
|
|
url = 'https://www.flickr.com/'
|
|
|
|
|
search_url = url + 'search?{query}&page={page}'
|
|
|
|
|
photo_url = 'https://www.flickr.com/photos/{userid}/{photoid}'
|
|
|
|
|
regex = re.compile(r"\"search-photos-models\",\"photos\":(.*}),\"totalItems\":", re.DOTALL)
|
|
|
|
|
image_sizes = ('o', 'k', 'h', 'b', 'c', 'z', 'n', 'm', 't', 'q', 's')
|
|
|
|
|