Selenium Python Instagram Instagram关注按钮

时间:2020-04-12 14:04:31

标签: python selenium selenium-webdriver instagram bots

在使用硒的Instagram中遵循此方法似乎不起作用 没有产生错误,仍然没有出现

follow = webdriver.find_element_by_xpath("//button[text()='Follow']")

ActionChains(webdriver).move_to_element(follow).click().perform()

1 个答案:

答案 0 :(得分:1)

当我使用跟随按钮的完整xpath并删除动作链并仅使用click()时,它似乎起作用了

follow = webdriver.find_element_by_xpath("/html/body/div[1]/section/main/div/header/section/div[1]/div[1]/span/span[1]/button").click()