马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
from selenium import webdriver
browser=webdriver.Chrome()
browser.get('https://www.baidu.com')
print(browser.page_source)
browser.close()
C:\Users\tiger\PycharmProjects\spider\venv\Scripts\python.exe C:/Users/tiger/PycharmProjects/spider/1.py
Traceback (most recent call last):
File "C:\Users\tiger\PycharmProjects\spider\venv\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start
stdin=PIPE)
File "C:\Users\tiger\Anaconda3\lib\subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "C:\Users\tiger\Anaconda3\lib\subprocess.py", line 1207, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/tiger/PycharmProjects/spider/1.py", line 3, in <module>
browser=webdriver.Chrome()
File "C:\Users\tiger\PycharmProjects\spider\venv\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in __init__
self.service.start()
File "C:\Users\tiger\PycharmProjects\spider\venv\lib\site-packages\selenium\webdriver\common\service.py", line 83, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
Process finished with exit code 1
大佬们,求解我哪儿有问题
|