我正在尝试获取当前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"
}]
},