1
인형극에 문제가 있습니다. 내가하고 싶은 일은 웹 사이트를 시작하고 로그인하는 것입니다. 그러나이 웹 사이트는 안전하지 못하기 때문에 차단 된 리소스를로드하려고 시도합니다. 코드를 실행 한 후이 오류 메시지가 표시 및 코드 실행을 중지 :node.js에서 SSL 인증서 오류가 발생했습니다.
(node:11684) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: SSL Certificate error: ERR_CERT_COMMON_NAME_INVALID
(node:11684) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
내 코드 :
'use strict';
const puppeteer = require('puppeteer');
async function Login(username, password){
const browser = await puppeteer.launch({
headless: false
});
const page = await browser.newPage();
await page.goto('https://shop.adidas.ae/en/customer/account/login', {waitUntil: 'networkidle'});
/*await page.type(username);
await page.focus('#pass');
await page.type(password);
await page.click('#send2');*/
await browser.close();
}
Login('xxx', 'xxx');
이는 크롬 consule가 끄는 것입니다 :
Failed to load resource: net::ERR_INSECURE_RESPONSE
내 환경을 : 최신 퍼핏 티어 버전/Windows 10