electron内监控目标网站cookie的变化,查找指定的cookie

let cookieInstance = win.webContents.session.cookies;
cookieInstance.on('changed', (e, cookie, cause, removed) => {
let obj = { e, cookie, cause, removed }
console.log(obj);
});
cookieInstance.get({ domain: 'dayu.com' }, (error, cookies) => {
let tarCookie = cookies.find(v => v.name == "USER_TMP")
});

代码如上↑

上一篇:机器学习classification_report方法及precision精确率和recall召回率 说明


下一篇:机器学习:评价分类结果(F1 Score)