1

我正在使用以下配置测试 instapy,它登录、检查帐户和标签信息,但似乎并没有真正喜欢或评论。最后,它为所有操作报告 0。我在 OS X 上运行,似乎没有报告错误,除了:

警告 [2021-08-26 15:46:07] [user] - 隐藏 Selenium 扩展:错误

# imports
from instapy import InstaPy
from instapy import smart_run
from instapy import set_workspace
import random


# set workspace folder at desired location (default is at your home folder)
set_workspace(path=None)

session = InstaPy(username="user", 
                  password="pass",
                  headless_browser=False)

comments = ['Nice!','Check us out :)','Interested in a free listing?','Very cool!']

with smart_run(session):
  hashtags = ['naturalproducts','naturalproduct','skincare','skincareproducts']
  random.shuffle(hashtags)
  
  session.set_skip_users(skip_private=True,
                       skip_no_profile_pic=True,
                       skip_business=False,
                       skip_non_business=True)
  session.set_do_like(enabled=True, percentage=90)
  session.set_delimit_liking(enabled=True, max_likes=30, min_likes=0)
  session.set_do_comment(enabled=True, percentage=80)
  session.set_comments(comments)
  session.set_do_follow(enabled=False, percentage=40, times=1)
  #session.set_dont_unfollow_active_users(enabled=True, posts=1)

  #session.unfollow_users(amount=10,
  #                       nonFollowers=True,
  #                       style="FIFO",
  #                       unfollow_after=12 * 60 * 60, sleep_delay=501)

  session.set_quota_supervisor(enabled=True,
                               sleep_after=["likes", "comments", "follows", "unfollows", "server_calls"],
                               sleepyhead=True,
                               stochastic_flow=True,
                               notify_me=True,
                               peak_likes_hourly=45,
                               peak_likes_daily=560,
                               peak_comments_hourly=30,
                               peak_comments_daily=300,
                               peak_follows_hourly=30,
                               peak_follows_daily=500,
                               peak_unfollows_hourly=20,
                               peak_unfollows_daily=250,
                               peak_server_calls_hourly=200,
                               peak_server_calls_daily=2500)

  session.set_relationship_bounds(enabled=True,
                                  potency_ratio=None,
                                  delimit_by_numbers=True,
                                  max_followers=5000,
                                  max_following=5000,
                                  min_followers=4,
                                  min_following=4)

  #session.follow_user_followers(['user1' ,'user2'], amount=10, randomize=True, sleep_delay=60)
  session.like_by_tags(hashtags, amount=20, interact=False, skip_top_posts=True)
  session.like_by_feed(amount=10, randomize=True, unfollow=False, interact=True)
4

0 回答 0