Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Phantomjs 无法加载url,然后无法发送登录参数_Phantomjs_Casperjs - Fatal编程技术网

Phantomjs 无法加载url,然后无法发送登录参数

Phantomjs 无法加载url,然后无法发送登录参数,phantomjs,casperjs,Phantomjs,Casperjs,我尝试在tumblr中自动登录,运行建议的脚本,但phantomjs只显示失败的尝试: [info] [phantom] Starting... [info] [phantom] Running suite: 3 steps [debug] [phantom] opening url: https://tumblr.com/login, HTTP GET [debug] [phantom] Navigation requested: url=https://tumblr.com/login, t

我尝试在tumblr中自动登录,运行建议的脚本,但phantomjs只显示失败的尝试:

[info] [phantom] Starting...
[info] [phantom] Running suite: 3 steps
[debug] [phantom] opening url: https://tumblr.com/login, HTTP GET
[debug] [phantom] Navigation requested: url=https://tumblr.com/login, type=Other,willNavigate=true, isMainFrame=true
[warning] [phantom] Loading resource failed with status=fail: https://tumblr.com/login
[debug] [phantom] Successfully injected Casper client-side utilities
[debug] [phantom] Logging in
[info] [remote] attempting to fetch form element from selector: '#signup_form'
[info] [phantom] Step anonymous 2/3: done in 2899ms.
[info] [phantom] Step _step 3/3: done in 2912ms.
[warning] [phantom] Casper.waitFor() timeout  
[error] [phantom] Wait timeout of 100000ms expired, exiting.
Wait timeout of 100000ms expired, exiting.
我增加了原始超时脚本但没有成功,我的工作站使用: -Windows 7 64位 -Casperjs 1.1.0 -幻影JS 1.9.1


谢谢。

我终于找到了解决这个问题的办法。 Tumblr对其站点使用TLSv1.2加密,而PhantomJS默认为SSLv3

要解决此问题,您可以使用以下任一方法调用CasperJS:

casperjs tumblr.js --ssl-protocol=tlsv1


在我的casperjs和phantomjs版本中,cli ssl协议参数被忽略,我不得不将其放在配置文件中:

casperjs browse.js --config=<(echo '{"sslProtocol": "any"}') --ignore-ssl-errors=true

casperjs browse.js--config=不确定这里出了什么问题。我无法访问他们网站上的任何页面,但它在一周前起作用。谢谢你的评论,我没有太多经验,但所有其他URL都运行良好,因此我将继续尝试寻找任何线索。嗨,我仍然有“失败”消息,我正在尝试casper 1.1.0开发版本,你尝试了哪个版本?非常感谢!我是CasperJS 1.1.0-dev和Linux上的PhantomJS 1.9.2。我在Ubuntu12上进行了测试,它运行正常,url已加载。现在我在最后一步有一些超时,但我需要更多的时间来测试它。谢谢我正在使用Ubuntu12和--ssl protocol=tlsv1,我仍然了解:blank@DaltonTan您也可以尝试添加
--ignore ssl errors=true
,但我不确定这是否有帮助,因为我无法重现您的问题。
casperjs browse.js --config=<(echo '{"sslProtocol": "any"}') --ignore-ssl-errors=true