0

我想使用 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 帐户,找到帖子和评论但仍然不喜欢这些评论的代码。

有没有人看到一个重大错误,或者可以给我一些提示,我必须调整代码的哪一部分?

4

1 回答 1

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
于 2021-07-30T11:16:58.000 回答