Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var numberOfUsers = 3000 // the number of users you want to follow (it will break after about 5000)
- function harvest() {
- // keep scrolling the page to the bottom
- $("#search").scrollTop($("#search")[0].scrollHeight);
- // get all the follow buttons
- var bs = $('*[data-capture=”noiseClicked”]')//.length
- // figure out how many follow buttons you have
- var len = bs.length
- // show the number of people you have on the page because you’re impatient
- console.log(len)
- // if you have more than said number then stop harvesting
- if ( len > numberOfUsers) {
- } else {
- // choose a random number of time for when to call harvest again, since internet speeds differ
- setTimeout(harvest, Math.floor(Math.random() * 500) + 1);
- }
- }
- // start harvesting
- harvest();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement