小编goo*_*oof的帖子

如何在Selenium中使用命令行选项启动PhantomJS?

我找不到如何使用命令行选项启动phantomjs --cookies-file=/path/to/cookies.txt和其他...

试过driver = webdriver.PhantomJS('--cookies-file=/tmp/ph_cook.txt')但没什么.

由于未知原因add_cookie,不能保持记录.

我试着像这样开始幻影:

driver = webdriver.PhantomJS(executable_path = "phantomjs --cookies-file=/tmp/ph_cook.txt --webdriver")
Run Code Online (Sandbox Code Playgroud)

但得到错误:

raise WebDriverException("Unable to start phantomjs with ghostdriver.", e)
selenium.common.exceptions.WebDriverException: Message: Unable to start phantomjs with ghost driver.
Run Code Online (Sandbox Code Playgroud)

python cookies selenium webdriver phantomjs

5
推荐指数
1
解决办法
2778
查看次数

标签 统计

cookies ×1

phantomjs ×1

python ×1

selenium ×1

webdriver ×1