【发布时间】:2019-05-26 17:52:34
【问题描述】:
我想通过 python 在 Instagram 中查看我的关注者列表。我写了这段代码
from InstagramAPI import InstagramAPI
username="*******"
InstagramAPI = InstagramAPI(username, "******")
InstagramAPI.login()
InstagramAPI.getProfileData()
followers = InstagramAPI.getTotalSelfFollowers()
print (followers[0])
它工作正常并显示
{u'username': u'yasinyasinyasinl', u'has_anonymous_profile_picture': True, u'profile_pic_url': u'https://instagram.fevn1-1.fna.fbcdn.net/vp/19319123fc5a0016b6fd518cfa7058ce/5D7C0DF1/t51.2885-19/44884218_345707102882519_2446069589734326272_n.jpg?_nc_ht=instagram.fevn1-1.fna.fbcdn.net', u'full_name': u'yasin', u'pk': 5580539929, u'is_verified': False, u'is_private': True}
我想拿到所有的钥匙 我试试
for a,b in followers[0]:
print (followers[0].keys())
但它没有工作。 我该怎么办?
和
print (followers[0].get(username))
None
【问题讨论】: