Twitter大量关注脚本

时间:2018-08-15 18:09:36

标签: twitter

有一个JavaScript可以批量关注Twitter用户,但我想:

  • 仅关注(而非关注)仅关注您的用户(排除关注您的用户)

  • 我想在每次跟踪之间引入延迟或暂停。

我的代码是:

function unfollowunfollowers() {
    // Declaramos las variables
    var index, users; 
    users = document.getElementsByClassName('ProfileCard');
    for (index = 0; index < users.length; ++index) {
        // I check if the user follow us or not
        var followstatus = users[index].getElementsByClassName('FollowStatus');
        if (followstatus.length == 0) {
            // I check if I'm following this user or not (0 = I'm following this user)
            var nofollowing = users[index].getElementsByClassName('not-following');
            if (nofollowing.length == 0) {
                // If the user don't follow us, we unfollow him
                users[index].getElementsByClassName('follow-button')[0].click();
            }
        }
    }
}

0 个答案:

没有答案