PhantomJS - 资源重定向导致请求错误

时间:2015-05-28 10:39:57

标签: javascript phantomjs

我收到了"资源请求错误"当https中的资源重定向到http资源时。此错误阻止获取html内容。

示例:

phantomjs --ignore-ssl-errors=yes --debug=true  phantom-script.js 
http://io9.com/the-milky-way-flows-into-the-sea-170738633

    2015-05-28T12:08:51 [DEBUG] Network - Resource request error: 5 ( 
"Operation canceled" ) URL: "https://kinja.com/api/profile/getsession?redirect=http%3A%2F
%2Fio9.com%2Fsetsession%3Fr%3Dhttp%253A%252F%252Fio9.com%252Fthe-milky-
way-flows-into-the-sea-1707386330"
    = onResourceError()

如何处理这类错误?

0 个答案:

没有答案