- driver = webdriver.PhantomJS(executable_path=r'D:/Program Files/phantomjs-2.1.1-windows/bin/phantomjs')
- Traceback (most recent call last):
- File "<ipython-input-10-5a05d2dc2ee7>", line 1, in <module>
- driver = webdriver.PhantomJS(
在使用PhantomJS爬虫时遇到PermissionError,原因是执行身份对工作目录缺少写入权限。解决方法包括切换到有写入权限的目录或动态创建临时文件作为日志输出,以防止多实例同时执行时的日志覆写问题。