-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
My code:
const filter = {
urls: ['http://abc.com']
}
player.nightmare
.onBeforeRequest(filter, function(detail, callback) {
callback({
cancel: true
});
})
.onErrorOccurred({ urls: ['http://*/*', 'https://*/*'] })
.on('onErrorOccurred', function(details) {
console.log(details);
if (details.resourceType == "mainFrame" && details.error == "net::ERR_BLOCKED_BY_CLIENT") {
console.log("fail to load website: ", details.url);
player.nightmare.end();
}
}).goto("https://youtube.com").wait(30000);
it will return error:
{
"message": "navigation error",
"code": -20,
"details": "ERR_BLOCKED_BY_CLIENT",
"url": "https://youtube.com/"
}
kyungw00k