Run phantomjs with --ignore-ssl-errors=true from casperjs

别说谁变了你拦得住时间么 提交于 2019-11-28 11:55:53

As per https://casperjs.readthedocs.org/en/latest/cli.html#casperjs-native-options

Last but not least, you can still use all PhantomJS standard CLI options as you would do with any other phantomjs script:

$ casperjs --web-security=no --cookies-file=/tmp/mycookies.txt myscript.js

So, I guess, it would be

casperjs --ignore-ssl-errors=true yourjsapp.js 

Was having the same issue with a site that was previously working but then suddenly stopped working with the "Loading resource failed with status=fail:" message.

I hadn't changed versions of anything nor my script so something must have changed on the server side. Ultimately, the fix for me was to set the following option:

--ssl-protocol=tlsv1

This link was useful in giving some different options to try: https://github.com/n1k0/casperjs/issues/49

Other suggestions on the page were:

--ignore-ssl-errors=true
--ssl-protocol=any
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!