我想使用InstaPy包和以下代码在Instagram上的帖子下点赞:
from instapy import InstaPy
from instapy import smart_run
insta_username = '***'
insta_password = '***'
session = InstaPy(username=insta_username,
password=insta_password,
headless_browser=False)
with smart_run(session):
session.set_do_like(enabled=True, percentage=100)
session.interact_by_comments(usernames=["***"],
posts_amount=1,
comments_per_post=5,
reply=True,
interact=True,
randomize=False,
media=None)
我已经多次更改和调整代码,但是上面的代码是至少至少登录我的Instagram帐户,找到帖子和评论但仍然不喜欢这些评论的唯一
有人看到重大错误还是可以给我一些提示,说明我必须对代码的哪一部分进行调整?
非常感谢您的帮助。
Tobias
答案 0 :(得分:0)
#This is used to perform likes on your own feeds
#amount=100 specifies how many total likes you want to perform
#randomize=True randomly skips posts to be liked on your feed
#unfollow=True unfollows the author of a post which was considered
#inappropriate interact=True visits the author's profile page of a
#certain post and likes a given number of his pictures, then returns to feed
session.like_by_feed(amount=100, randomize=True, unfollow=True, interact=True)
Font: https://instapy.org/actions#interact-with-specific-users