怎样批量清空微博?亲测有效2025
时间:2025-04-29 来源:互联网
一、具体操作方法:
1、打开wb网页版,个人主页(个人用的谷歌浏览器)。
2、按F12,笔记本按住Fn+F12,进入控制台(Console),把下面的代码贴进去,回车启动。
二、小贴士:
1、MAC:command+option+i唤起开发者工具
2、如果过程中有提示授权,需要先按照提示,填写要求的内容,然后回车授权,再贴代码回车。
3、效果就是:屏幕上不断看到系统自动删除微博。
4、想结束就刷新下页面。
三、代码如下:
functiondelay(timeout=100){
returnnewPromise((resolve)=>{
setTimeout(()=>{
resolve()
},timeout)
})
}
functionfindOffsetParent(node){
while(!node.offsetParent.classList.contains('vue-recycle-scroller__item-view')){
node=node.offsetParent
}
returnnode.offsetParent
}
constinitializedScrollTop=600
leterrorCount=0
asyncfunctionreadyGo(){
constangleDownList=document.querySelectorAll('i[class="woo-fontwoo-font--angleDownmorepop_action_bk3Fq"]')
constangleDownListLength=angleDownList.length
try{
if(!angleDownList){
returnconsole.log
}
if(!angleDownListLength){
returnconsole.log("这下清爽多了!!!")
}
//展开下拉框
angleDownList[1].click()
//点击删除
constpopItems=document.querySelectorAll('div[class="woo-box-flexwoo-box-alignCenterwoo-pop-item-main"]')
for(leti=0;i<popItems.length;i++){
constnode=popItems[i]
if(node.innerText==="删除"){
node.click()
break
}
}
awaitdelay()
constoffsetParent=findOffsetParent(angleDownList[1])
//确认删除
document.querySelectorAll('button[class="woo-button-mainwoo-button-flatwoo-button-primarywoo-button-mwoo-button-roundwoo-dialog-btn"]')[0].click()
awaitdelay()
constdoc=document.documentElement||document.body
doc.scrollTo(0,initializedScrollTop+offsetParent.offsetHeight)
errorCount=0
}catch(e){
if(errorCount>=5){
returnconsole.error('重新执行吧:',e)
}
document.body.click()
errorCount+=1
readyGo()
return
}
if(angleDownListLength>=2){
readyGo()
}
}
readyGo()
更多微博相关教程,敬请期待phpfans软件教程栏目。
-
Java中HashSet详解(定义、底层实现原理、使用方法) 2025-04-29
-
决战平安京椒图新皮肤什么时候出-缚蛊绡上线时间 2025-04-29
-
暗区突围五一兑换码推荐-暗区突围五一节福利码 2025-04-29
-
暗区突围五一白嫖活动有哪些-暗区五一福利前瞻 2025-04-29
-
黑色信标出货概率是多少-黑色信标详细卡池出金概率表 2025-04-29
-
InputStreamReader详解(基本功能、构造方法、常用方法) 2025-04-29