好的,所以我需要构建这个应用程序,我将从www.flickr.com帐户读取图像并使用我的Python应用程序中的图像.我该怎么做?有任何想法吗?谢谢.
你可以使用各种flickr python库之一:
有关flickr API的概述,请始终查看文档:http://www.flickr.com/services/api/
一个例子:
import flickrapi
api_key = 'API KEY YYYYYYYYYY' # you will need a key
api_password = 'your secret'
flickrClient = flickrapi.FlickrAPI(api_key, api_password)
# now you could use the methods on this client
# flickrClient.methodname(param)
favourites = flickrClient.favorites_getPublicList(user_id='userid')
# Get the title of the photos
for photo in favourites.photos[0].photo:
print photo['title']
Run Code Online (Sandbox Code Playgroud)
[编辑:]
有关身份验证,请访问:http://stuvel.eu/flickrapi/documentation/#authentication
| 归档时间: |
|
| 查看次数: |
2117 次 |
| 最近记录: |