关注Twitter页面上的所有用户 [英] Follow all users on a twitter page
本文介绍了关注Twitter页面上的所有用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在 https://twitter.com/#!/username/followers ;是否有任何关于该页面上的所有Twitter用户的greasemonkey脚本?
I'm on https://twitter.com/#!/username/followers ; is there any greasemonkey script to follow all the twitter users on that page?
推荐答案
这是一个新的,也使用延迟到防止垃圾邮件问题
Here's a new one which also employs a delay to 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 " + i + " 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();
它的作用:
- 查找关键按钮
- 检查您是否已关注或未决(
display:block
check) - 设置一个计时器,每隔500毫秒点击一次FOLLOW按钮,以防止垃圾邮件问题。
- 新!当它完成所有操作后,滚动页面并等待几秒钟以显示下一个加载,然后重复整个过程!
- Looks for follow buttons
- Checks that you aren't already following or pending (
display: block
check) - Sets a timer to click the FOLLOW buttons every 500ms to prevent spam issues.
- NEW! When it's done them all, scrolls the page and waits a couple seconds for the next loads to appear, then repeats the whole process!
黑客注意事项:
- 自2016年9月30日起适用于Chrome最新版本和Twitter。
- 您似乎需要点击A标签内的DIV,而不是A标签本身。
- HOMEWORK:也许尝试使用jQuery的live()函数自动点击任何新按钮在初始页面加载后显示:):
免责声明:这不是一个黑客......只是一种保存手腕的技巧和手指RSI :)无论如何谨慎和尊重地使用。
Disclaimer: This is not a hack...just a technique to save some wrist and finger RSI :) Regardless, use cautiously and respectfully.
更新:改进了最新的推特。现在在时间上采用随机性使你看起来不像机器人
UPDATE: Improved for latest twitter. Now employs randomness in the timing to make you look less like a bot
这篇关于关注Twitter页面上的所有用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文