批量删除B站抽奖动态
发表于|更新于
|字数总计:337|阅读时长:1分钟|阅读量:
转载自 https://www.bilibili.com/video/av95622019
需要到自己的B站主页,之后点开开发者工具,在控制台下粘贴以下代码后回车
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| // 域名: space.bilibili.com
var needDelDeled = true, delay = 1000, scrolls = 800; var w = '', d = '', r = 0; function getLuckyDraw() { w.css("background-color", "#f1c40f"); w = w.parents(".card"); w.css("background-color", "#2ecc71"); w[w.length - 1].querySelectorAll(".child-button")[1].click(); setTimeout(clickDel, delay); } function getDel() { d.css("background-color", "#8e44ad"); d = d.parents(".card"); d.css("background-color", "#2ecc71"); d[d.length - 1].querySelectorAll(".child-button")[1].click(); setTimeout(clickDel, delay); } function clickDel() { //点删除 $(".popup-content-ctnr")[$(".popup-content-ctnr").length - 2].querySelector(".bl-button").click(); // 点确定 r += scrolls; $('html, body').animate({ scrollTop: r }, 30); $(".fold-text").click() $(".expand-btn").click(); w = $(".main-content").find('span[click-title="抽奖详情"]'); d = $(".main-content").find('.deleted-text'); if (d.length && needDelDeled) setTimeout(getDel, delay); else setTimeout(getLuckyDraw, delay); } if (/dynamic/.test(window.location.href) && confirm("是不是要删除抽奖动态")) { r += scrolls; $('html, body').animate({ scrollTop: r }, 30); $(".fold-text").click() $(".expand-btn").click(); w = $(".main-content").find('span[click-title="抽奖详情"]');//*互动抽奖内容定位 d = $(".main-content").find('.deleted-text'); //*已删除内容定位 if (d.length && needDelDeled) setTimeout(getDel, delay); else setTimeout(getLuckyDraw, delay); }
|