【问题标题】:How to make Instagram bot to like comments under post on feed?如何让 Instagram 机器人在动态帖子下点赞评论?
【发布时间】:2020-11-19 11:16:40
【问题描述】:

我想使用 InstaPy 包和以下代码在 Instagram 上的帖子下为 cmets 点赞:

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

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

【问题讨论】:

  • 我刚刚更新了 .10 版本的 InstaPy,但还是不行。 :(
  • 机器人知道它应该喜欢哪张图片吗?

标签: python python-3.x bots instagram instapy


【解决方案1】:
#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

【讨论】:

    猜你喜欢
    • 2016-08-15
    • 2021-11-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-06-16
    相关资源
    最近更新 更多