批量删除微博
document
.querySelectorAll(".WB_feed.WB_feed_v3.WB_feed_v4 >div[mid]")
.forEach((nodeItem, index) => {
setTimeout(async () => {
try {
let res = await fetch(
"https://weibo.com/aj/mblog/del?ajwvr=6",
{
method: "post",
headers: {
"Content-Type":
"application/x-www-form-urlencoded; charset=UTF-8"
},
body: "mid=" + nodeItem.getAttribute("mid")
}
);
if ((await res.json()).code === "100000") {
nodeItem.remove();
}
} catch (error) {
console.error(error);
}
}, 500 * index);
});