不想用一刻相册了,我感觉百度是个坑,说不定哪天让你付费,否则就无法下载图片
但是下载的时候发现,每次只能选中100张,我就在控制台写了一个遍历模拟点击的代码
async function download(){
document.querySelectorAll(".time img").forEach(dom=>{
console.log(dom.click())//遍历选中默认100张
})
await delay(2000) //延时1秒
document.querySelector(".yk-icon-datuxiazai").click()//触发下载
await delay(2000)//延迟疫苗
document.querySelectorAll(".time img").forEach(dom=>{
console.log(dom.click())//把下载的删除,我的目的是为了清空一刻相册,转到别的网盘,你不要清空这句可以删掉
})
await delay(2000)
document.querySelector(".right-btn .yk-icon-trash").click()
await delay(2000)
document.querySelector(".popover-content .confirm").click()//触发删除,也可以删掉
await delay(1000)
setTimeout(this.download,7000)
}
//延迟函数
function delay(time){
return new Promise((r,e)=>{
setTimeout(r,time)
})
}
download()
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。