autox.js脚本,采集抖音直播间评论信息

2024-05-14 08:38:12 浏览数 (1)

autox.js脚本,采集抖音直播间评论信息

代码语言:javascript复制
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);
}

0 人点赞