我正在尝试刮取一个URL(https://www2.sancristobalseguros.com.uy/PortalScNet_UY/Productores/Login/Loguin.aspx),由于某种原因,我甚至无法获取内容,但是挂起套接字错误:

未处理拒绝RequestError:错误:套接字在Request.plumbing.callback处挂起新的RequestError(C:\ Users \ x \ Desktop \ App \ node_modules \ request-promise-core \ lib \ errors.js:14:15)在Request.RP $ callback [as _callback]的C:\ Users \ x \ Desktop \ App \ node_modules \ request-promise-core \ lib \ plumbing.js:87:29)(C:\ Users \ x \ Desktop \ App \ node_modules \ request-promise-core \ lib \ plumbing.js:46:31)在emitOne上的self.callback(C:\ Users \ x \ Desktop \ App \ node_modules \ request \ request.js:185:22) events.js:116:13)在Request.emit(events.js:211:7)的Request.onRequestError(C:\ Users \ x \ Desktop \ App \ node_modules \ request \ request.js:877:8)at at在TLSSocket的emitOne(events.js:116:13)的TLSSocket.socketErrorListener(_http_client.js:387:9)的ClientRequest.emit(events.js:211:7)发出了emitOne(events.js:116:13) . 在process._tickCallback(internal / process / next_tick)的_combinedTickCallback(internal / process / next_tick.js:138:11)的emitErrorNT(internal / streams / destroy.js:64:8)发出(events.js:211:7)的.js:180:9)

我可以获得任何其他SSL页面,但是,我不能 . 我能够获得它的HTTP版本,但我需要获取HTTPS,因为我需要收集cookie等 .

这是代码(简单):

const re = require("request-promise");
const $ = require("cheerio");

const inUri = "https://www2.sancristobalseguros.com.uy/PortalScNet_UY/Productores/Login/Loguin.aspx";

re.get(inUri, {
 strictSSL: false
}).then(data => {
    console.log(data);
});