我Instaloader
在 Python 中发现了允许抓取Instagram 个人资料的 lib。它非常好,但我无法找到一种方法来获取在 Instagram 上发表评论或喜欢帖子的用户列表。
我查看了所有文档,但找不到答案。这是文档:https ://instaloader.github.io/as-module.html
这是我拥有的代码:
import instaloader
L = instaloader.Instaloader() #nalazenje stvari sa instagrama
profile = instaloader.Profile.from_username(L.context, 'jlo') #daj mi pratioce od datog user-a
print(profile.get_posts())
for post in profile.get_posts():
post_likes = post.get_likes()
post_comments = post.get_comments()
print(post_likes) # post_likes object
print(post_comments) # # post_comments object
# post_likes.name post_likes.username post_likes.user DOES NOT WORK
# post_comments.name post_comments.username post_comments.user DOES NOT WORK