0
我使用flickrapi下載專輯和寫這代碼的所有專輯:蟒蛇flickrapi下載
flickr = flickrapi.FlickrAPI(api_key, api_password, format='parsed-json')
userid = 'XXXXXXXXX'
# auth and token not required anymore, since already cached
#flickr.authenticate_via_browser(perms='read')
#token = flickr.get_request_token()
photos = flickr.photos.search(user_id=userid, per_page='100')
sets = flickr.photosets.getList(user_id=userid)
#print photos
#print sets
total_photos=0
for photoset_index in sets['photosets']['photoset']:
photoset_title = photoset_index['title']['_content']
number_photos = photoset_index['photos']
total_photos=total_photos+number_photos
#print photoset_title,number_photos
total_number_of_albums = len(sets['photosets']['photoset'])
print total_number_of_albums
for photos_index in photos['photos']['photo']:
photo_name = photos_index['title']
photo_id = photos_index['id']
#print photo_name, photo_id
total_number_of_pics = photos['photos']['total']
print total_photos, total_number_of_pics
我可以拿到專輯,照片數量的名字,但我怎麼進入音樂圖片?文檔和開發者api沒有說下載的任何內容。 https://www.flickr.com/services/api/