gpt4 book ai didi

python - 使用 Python 从 www.flickr.com 帐户读取图像

转载 作者:行者123 更新时间:2023-11-28 20:11:21 25 4
gpt4 key购买 nike

好的,所以我需要构建这个应用程序,我将从 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']

[编辑:]

有关身份验证,请查看:http://stuvel.eu/flickrapi/documentation/#authentication

关于python - 使用 Python 从 www.flickr.com 帐户读取图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4030824/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com