实现微博批量取消关注用户

为了实现批量取关微博用户,写了个小东西~仅供参考

1,代码

JS代码:

// ==UserScript==
// @name         批量选择微博关注列表
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://weibo.com/*
// @grant        none
// ==/UserScript==

(function() {
    // 等待两秒钟再进行评论
    setTimeout(function(){

document.getElementsByClassName("btn_link S_txt1")[0].click()
        var i = 0;
                                alert('好戏开始!');
        for(i=0;i<=29;i++)
        {
            document.getElementsByClassName("mod_pic S_line1")[i].click();
        }

},2000);//ajax do something


})();

2,效果:

先是一个没用的输出语句:

而后效果:

3,最后一步,还是手工来吧。毕竟也不是很费事!

OK

猜你喜欢

转载自blog.csdn.net/weixin_42859280/article/details/109318246
今日推荐