-
-
Save thomasrstegelmann/6e459898dc3640bf921c to your computer and use it in GitHub Desktop.
a = setInterval(function () { | |
window.scrollTo(0,document.body.scrollHeight); | |
$(".ProfileCard-userFields").each( function() { | |
if($(this).find('.ProfileCard-bio').text().match(new RegExp("google|twitter|airbnb|entrepreneur|founder|tech|growthhacking|hacking|official|consultant|analytics|ecom|startup|ceo|ux|seo|ecommerce|growth"), "g") !== null ) | |
{ | |
$(this).parent().find('.not-following .user-actions-follow-button.js-follow-btn').click(); | |
} | |
} ); | |
}, 1000); |
@amolwagh you can do that easily adding to the regex
"google|twitter|airbnb|entrepreneur|founder|tech|growthhacking|hacking|official|consultant|analytics|ecom|startup|ceo|ux|seo|ecommerce|growth|(?!sex|anotherblockedword|porn)"
the last bit says negative lookahead these words and ignore them
I suggest making the script go a bit slower to avoid being banned.
The 1000 is 1s delay between follows.
Also instead of having the regexp there, you can have it in a separate variable so it's easier to edit.
text preceeded by // is a comment and won't be run. It is there to explain what can be done
var regex = ["google", "twitter", "airbnb", "entrepreneur", "founder", "tech", "growthhacking", "hacking",
"official", "consultant", "analytics", "ecom", "startup", "ceo", "ux", "seo", "ecommerce", "growth"]; // add or change words here
var banned = ["|(?!", "sex", "porn"] // add more banned words here
var target = regex.join("|") + banned.join("|") + ")";
var interval = 5000 // 1000 = 1 second
a = setInterval(function () {
window.scrollTo(0,document.body.scrollHeight);
$(".ProfileCard-userFields").each( function() {
if($(this).find('.ProfileCard-bio').text().match(new RegExp(target), "g") !== null )
{
$(this).parent().find('.not-following .user-actions-follow-button.js-follow-btn').click();
}
} );
}, interval);
Can you a make similar auto-follow script for Quora? I've been looking everywhere, still couldn't find a working one
First of all, make sure that you are on /followers
page e.g => https://twitter.com/uber/followers
Open the developer console whiles you on that page and paste the following code
var regex = ["google", "twitter", "airbnb", "entrepreneur", "founder", "tech", "growthhacking", "hacking",
"official", "consultant", "analytics", "ecom", "startup", "ceo", "ux", "seo", "ecommerce", "growth"]; // add or change words here
var banned = ["|(?!", "sex", "porn"] // add more banned words here
var target = regex.join("|") + banned.join("|") + ")";
var interval = 10000 // 1000 = 1 second
a = setInterval(function () {
window.scrollTo(0,document.body.scrollHeight);
var fields = $(".ProfileCard-userFields");
for (var i = 0; i < fields.length; i++) {
var p = fields[i].getElementsByClassName('ProfileCard-bio');
if (p[0].textContent.length > 1) {
if (p[0].textContent.match(new RegExp(target), "g") !== null) {
$('.not-following .user-actions-follow-button.js-follow-btn').click();
}
}
}
}, interval);
awesome
Wow, this is like the best modification you have made. I wonder if you could add negative keywords like "-ppc", so it will ignore people with such keywords.
Anyways, it's awesome. Thanks a ton!