【问题标题】:Selenium python instagram follow buttonSelenium python instagram关注按钮
【发布时间】:2020-07-25 02:43:04
【问题描述】:

这似乎不适用于使用 selenium 的 Instagram 没有产生错误仍然没有跟随

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

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

【问题讨论】:

  • 你能在网页上贴一小段工作代码吗?
  • 我明白了,谢谢

标签: python selenium selenium-webdriver instagram bots


【解决方案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()

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多