JavaScirpt自动关注,直到你想停止为止。

(2020-2-2 23:06:24)
处理网页.https://gitee.com/改为你的用户名/dashboard

// https://gitee.com/用户名/dashboard

var alls=document.querySelectorAll("div.ui.small.basic.orange.button")
for(i=0;i<alls.length;i++){
    try{
        alls[i].click();
        console.log(i+"-----click")
    }catch(err){
        console.log('错误.------------------------------------'+err+'\n--------------------------------------');
    }
};
var next=document.querySelector("div.header>div.pull-right")
function click_(){
    next.click();
    alls=document.querySelectorAll("div.ui.small.basic.orange.button")
    for(i=0;i<alls.length;i++){
        try{
            alls[i].click();
            console.log(i+"-----click")
        }catch(err){
            console.log('错误.------------------------------------'+err+'\n--------------------------------------');
        }

    };
    console.log("click_one")
    next=document.querySelector("div.header>div.pull-right")
}


var stop=setInterval(click_,2000);

// clearInterval(stop)
// 运行.此句停止.
发布了90 篇原创文章 · 获赞 20 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/gwdfff/article/details/104150802