- add chrome extension
cjs
(add jQuery) - add the following code
- find a github rockstar user (40k+ follower)
- goto followers or following page -> refresh page ...
$(document).ready(function() {
//page 1
var bt_disabled = $('.pagination span').text() === "Previous";
//last page, not prev/next btn
var pre_next_btn = $('.pagination a').length;
//ex: "?page=100&tab=following"
var urlPara = location.search;
var currentPage = location.search.match(/-?\d+\.?\d*/) ? parseInt(location.search.match(/-?\d+\.?\d*/)[0]) : 0;
//remove all unfollow form
$('.unfollow').remove();
$('.follow button').each(function(index, value) {
let _this = $(this);
setTimeout(function() {
_this.trigger('click');
}, index * 40);
});
setTimeout(function() {
if (bt_disabled) {
$('.pagination a')[0].click();
} else if (pre_next_btn === 0) {
console.log('done......');
} else {
window.location = window.location.pathname + location.search.replace(currentPage, currentPage + 1);
}
}, 3500);
});
Current speed: 12 following / sec (43,000 / hour), it is easy to get 300k following but to scale up to 10 million following this is slow.
scale up? 10 million following target (crawler? hashmap? Search tree? Github API?)