我正在使用python3进行股票价格预测。尝试使用Chrome驱动程序从Yahoo Finance获取数据。但是smh,chromedriver在代码中没有响应。我已经设置了chromedriver的路径,并将该驱动程序保存在同一文件夹中。从同一位置在终端中运行时,它可以运行,但不能在代码中运行。
def getStocks(n):
url = r"https://finance.yahoo.com/screener/predefined/aggressive_small_caps?offset=0&count=202"
driver = webdriver.chrome()
driver.get(url)
错误是
driver = webdriver.chrome()
TypeError: 'module' object is not callable
任何帮助将不胜感激。
您可能正在寻找
webdriver.Chrome()