【问题标题】:FireFox geckodriver Not callable in selenium [duplicate]FireFox geckodriver 在硒中不可调用[重复]
【发布时间】:2021-03-24 22:56:54
【问题描述】:

您好,我尝试在 Selenium 的 python 中使用 FireFox geckodriver,就像这样:

driver = webdriver.firefox()
siteAddress='https://stackoverflow.com'
driver.get(siteAddress)

但我得到这个错误:

'module' object is not callable

我的 WebDriver 也在 My Py App 附近:

Location Image

【问题讨论】:

    标签: python python-3.x selenium web-scraping geckodriver


    【解决方案1】:

    webdriver.firefox 是 module 而你需要使用webdriver.Firefox 类实例

    尝试替换

    driver = webdriver.firefox()
    

    与

    driver = webdriver.Firefox()
    

    【讨论】:

      猜你喜欢
      • 2020-07-11
      • 2017-03-04
      • 1970-01-01
      • 2021-04-15
      • 1970-01-01
      • 2018-07-11
      • 2017-01-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多