简介
对于qq空间批量删除日志和相册的代码
直接抄网上日志的,自己改改
日志
(async () => {
let frameDocument = document.querySelector('.app_canvas_frame').contentWindow.document;
while (true) {
frameDocument.querySelectorAll('.del_btn').forEach(item => item.click());
await sleep(1500);
document.querySelectorAll('.qz_dialog_layer_sub').forEach(item => item.click());
await sleep(1500);
nextPage();
await sleep(1000);
}
function nextPage() {
let aTags = frameDocument.querySelector('.mod_pagenav_main>a');
for (let item of aTags) {
if (item.innerText == '下一页') {
item.click();
break;
}
}
}
function sleep(time) {
return new Promise(resolve => setTimeout(resolve, time));
}
})();
相册
(async () => {
let frameDocument = document.querySelector('.app_canvas_frame').contentWindow.document;
while (true) {
frameDocument.querySelectorAll('.js-album-delete').forEach(item => item.click());
await sleep(1500);
}
function sleep(time) {
return new Promise(resolve => setTimeout(resolve, time));
}
})();