11

I'm trying to login automatically in tumblr, running the script proposed here but phantomjs only shows failed attempts:

[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.

I increased the original timeout script without success, my workstation uses: - Windows 7 64bits - Casperjs 1.1.0 - Phantomjs 1.9.1

thanks.

4

2 回答 2

24

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

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

casperjs tumblr.js --ssl-protocol=tlsv1

或者

casperjs tumblr.js --ssl-protocol=any
于 2013-09-26T20:41:52.397 回答
7

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

casperjs browse.js --config=<(echo '{"sslProtocol": "any"}') --ignore-ssl-errors=true
于 2015-09-16T14:14:54.087 回答