我已经用python写了一个Instagram喜欢的机器人。喜欢的功能是:
unique_photos = len(pic_hrefs)
for pic_href in pic_hrefs:
driver.get(pic_href)
time.sleep(2)
try:
time.sleep(random.randint(4, 15))
like_button = lambda: driver.find_element_by_class_name("_8-yf5 ").click()
like_button().click()
for second in reversed(range(0, random.randint(18, 28))):
print_same_line("#" + hashtag + ': unique photos left: ' + str(unique_photos)
+ " | Sleeping " + str(second))
time.sleep(2)
except Exception as e:
time.sleep(2)
unique_photos -= 1
我现在想添加一个具有相同限制的Likecount。我还想检查一下我是否已经喜欢了一张照片,然后跳过那张。我该怎么做
是的,咏叹调的标签改变了。我是这样试的:
如果你喜欢。。。。 但它不起作用
相关问题 更多 >
编程相关推荐