Javascript PhantomJS加载网页时出现问题:“;“连接已关闭”';

Javascript PhantomJS加载网页时出现问题:“;“连接已关闭”';,javascript,phantomjs,connection,Javascript,Phantomjs,Connection,我正在使用PhantomJS,我所做的一切都很好,但我不知道刚才发生了什么。该URL在PhantomJS中未打开。URL为,代码如下所示: var page = require('webpage').create(),fs = require('fs'), args=require('system').args; // var url = 'http://fotogena.co'; var url = 'https://www.procuraduria.gov.co/CertWEB/Certif

我正在使用PhantomJS,我所做的一切都很好,但我不知道刚才发生了什么。该URL在PhantomJS中未打开。URL为,代码如下所示:

var page = require('webpage').create(),fs = require('fs'), args=require('system').args;
// var url = 'http://fotogena.co';
var url = 'https://www.procuraduria.gov.co/CertWEB/Certificado.aspx?tpo=1';
page.viewportSize = { width: 400, height: 400 };
page.open(url, function (status) {
    if(status==='success'){
        setTimeout(loadScripts, 1500)
    }else
        console.log(
                "Error opening url \"" + page.reason_url
                + "\": " + page.reason
            );
});

page.onResourceError = function(resourceError) {
    console.error('-----',resourceError.url + ': ' + resourceError.errorString, 'faber acá toy');
    phantom.exit(1);
};

function loadScripts(){
    setTimeout(function(){
        page.render('./probandoAntecedentes.jpg')
        phantom.exit(1);
    },1000)
}
控制台显示以下内容:

https://www.procuraduria.gov.co/CertWEB/Certificado.aspx?tpo=1: Connection closed
我搜索了可能的解决方案,并放置了
--ssl protocol=any
和其他选项,但它们都不起作用

我使用的是PhantomJS2.1.1