我正在尝试获取当前 instagram 照片之类的东西,所有其他 API 调用都可以正常工作并返回有效的东西。但是当我到达 media.likes.count 我得到:
TypeError: count() 只接受一个参数(给定 0)
tags = api.tag_recent_media(tag_name='tag',max_id=max_id_next)
for media in tags[0]:
url = media.images['standard_resolution'].url
max_id_next = tags[1].split("max_tag_id=")[1]
pic_user = media.user.username
pic_id = media.id
pic_link = media.link.split("p/")[1].replace('/','')
profile_pic = media.user.profile_picture
likes = media.likes.count
print likes
任何想法?它说我应该为它提供一个参数,但我不知道要给它什么参数,我希望它返回我当前元素的喜欢总数。
使用:https ://github.com/Instagram/python-instagram
端点:http: //instagram.com/developer/endpoints/tags/
"likes": {
"count": 1,
"data": [{
"username": "mikeyk",
"full_name": "Mike Krieger",
"id": "4",
"profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1242695_75sq_1293915800.jpg"
}]
},