利用autox.js识别抓取抖音直播间评论弹幕信息
auto(); history={}; console.show(true); while(true){ listBox=className("androidx.recyclerview.widget.RecyclerView").findOne(2000); if(!listBox){ continue; } allList=listBox.children(); for (var i = 0; i < allList.length; i++) { var user = allList[i]; if(!user) continue; var content = user.text(); if(!content) continue; content=content.replace(/\u200E/g, '').replace(/^[\*\s]+/,"").trim(); if(history[content]) continue; //打印内容 console.log(content); history[content]=1; if(history.length>200){ history.pop(); } } sleep(1000); }
原文地址:
https://www.uniqchat.com/54.html
标签:continue,js,content,抖音,var,弹幕,history From: https://www.cnblogs.com/taoshihan/p/18189304