【发布时间】:2020-07-02 18:00:41
【问题描述】:
我正在使用 Instapy 创建以下脚本:
#!/usr/bin/env python3
from instapy import InstaPy
number = int(input("How many Number of people you want to follow: "))
user = []
for i in range(0,number):
name = input("Enter Username to interact: ")
user.append(name)
session = InstaPy(username=" ",password=" ")
session.login()
#Used to Follow the User
session.set_do_follow(enabled=True, percentage=100)
#Used to comment on a post
session.set_comments(["Cool", "Super!"])
session.set_do_comment(enabled=True, percentage=80)
#Used to Like the Post of the User
session.set_do_like(True, percentage=70)
#Used to Interact with the User
session.interact_by_users(user, amount=5,randomize=True, media='Photo')
#Used to insteract by Comments
session.set_use_meaningcloud(enabled=True, license_key=' ', polarity="P")
session.set_use_yandex(enabled=True, API_key=' ', match_language=True, language_code="en")
session.set_do_reply_to_comments(enabled=True, percentage=100)
session.set_comment_replies(replies=[u"????????????", u"????????????????????????????????????", u"????????", "????????", u"????????????????????????????????????", u"????????????♂️????????????????", u"????????????", u"????", u"????", u"????", u"????????????????????", u"????????????"],media="Photo")
session.set_do_like(enabled=True, percentage=94)
session.interact_by_comments(user, posts_amount=10, comments_per_post=5, reply=True, interact=True, randomize=False, media="Photo")
session.end()
每当我尝试运行脚本时,都会显示以下错误:
Oh no! Failed to get the list of supported languages by Yandex Translate :( ~text language won't be matched
和
link_elems error local variable 'post_href' referenced before assignment
主要问题是在帖子上写cmets。
【问题讨论】:
标签: python python-3.x selenium-webdriver yandex instapy