javascript - Follow all users on a twitter page -
i'm on https://twitter.com/#!/username/followers ; there greasemonkey script follow twitter users on page?
here's new 1 employs delay prevent spam issues.
var follow_pause = 1250; var follow_rand = 250; var page_wait = 2000; __cnt__ = 0; var f; f = function() { var eles; var __lcnt__ = 0; eles = jquery('.grid-cell .not-following .follow-text').each(function(i, ele) { ele = jquery(ele); if (ele.css('display') != 'block') { console.trace('already following: ' + i); return; } settimeout(function() { console.trace("following " + + " of " + eles.length); ele.click(); if ((eles.length - 1) == i) { console.trace("scrolling..."); window.scrollto(0, document.body.scrollheight); settimeout(function() { f(); }, page_wait); } }, __lcnt__++ * follow_pause + math.random()*(follow_rand) - follow_rand/2); __cnt__++; }); } f();
what does:
- looks follow buttons
- checks aren't following or pending (
display: block
check) - sets timer click follow buttons every 500ms prevent spam issues.
- new! when it's done them all, scrolls page , waits couple seconds next loads appear, repeats whole process!
notes hackers:
- works on chrome latest version , twitter of 30th of sep 2016.
- you seem need "click" div inside tag, not tag itself.
- homework: maybe try jquery's live() function auto-click new buttons show after initial page load :)
disclaimer: not hack...just technique save wrist , finger rsi :) regardless, use cautiously , respectfully.
update: improved latest twitter. employs randomness in timing make less bot
Comments
Post a Comment