打开 一刻相册 网页,按F12打开控制台,在控制台中粘贴以下代码
async function download(){
const imgs = Array.from(document.querySelectorAll(".date-list .date-item .photo-list .photo-item .check-btn[data-v-691f924c]")).slice(0, 99);
click_doms(imgs) // 选中dom
await delay(2000)
document.querySelector(".yk-icon-datuxiazai").click()//触发下载
await delay(5000)//延迟5秒
// 选中并删除
click_doms(imgs) // 选中dom
await delay(2000)
document.querySelector(".right-btn .yk-icon-trash").click()
await delay(5000)
document.querySelector(".popover-content .confirm").click()//触发删除,也可以删掉
await delay(5000)
setTimeout(this.download,120_000)
}
// 延迟函数
function delay(time){
return new Promise((r,e)=>{
setTimeout(r,time)
})
}
// 选中dom函数
function click_doms(imgs) {
for (const dom of imgs) {
console.log("Clicking image...");
dom.click();
}
}
download()
然后按下回车,等待即可