|
发表于 2020-6-19 12:26:55
|
显示全部楼层
我的报错了
- Warning (from warnings module):
- File "C:\Users\嘉哥\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\phantomjs\webdriver.py", line 49
- warnings.warn('Selenium support for PhantomJS has been deprecated, please use headless '
- UserWarning: Selenium support for PhantomJS has been deprecated, please use headless versions of Chrome or Firefox instead
- Traceback (most recent call last):
- File "C:\Users\嘉哥\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\common\service.py", line 72, in start
- self.process = subprocess.Popen(cmd, env=self.env,
- File "C:\Users\嘉哥\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 854, in __init__
- self._execute_child(args, executable, preexec_fn, close_fds,
- File "C:\Users\嘉哥\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 1307, in _execute_child
- hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
- FileNotFoundError: [WinError 2] 系统找不到指定的文件。
- During handling of the above exception, another exception occurred:
- Traceback (most recent call last):
- File "C:\Users\嘉哥\Desktop\小甲鱼\python\Python2013\ooxx\jandan.py", line 81, in <module>
- jandan.run()
- File "C:\Users\嘉哥\Desktop\小甲鱼\python\Python2013\ooxx\jandan.py", line 72, in run
- first_page = self.get_1stpage()
- File "C:\Users\嘉哥\Desktop\小甲鱼\python\Python2013\ooxx\jandan.py", line 22, in get_1stpage
- browser = webdriver.PhantomJS()
- File "C:\Users\嘉哥\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\phantomjs\webdriver.py", line 56, in __init__
- self.service.start()
- File "C:\Users\嘉哥\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\common\service.py", line 81, in start
- raise WebDriverException(
- selenium.common.exceptions.WebDriverException: Message: 'phantomjs' executable needs to be in PATH.
- >>>
复制代码 |
|