Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Lists out all a person's followers.
- //Slightly less basic script that also automatically scrolls to the bottom of the page. Based on https://pastebin.com/AHULAAHd
- var myJSON;
- function scroll(){
- window.scrollTo(0, document.body.scrollHeight);
- window.setTimeout(scroll, 300);
- var aFollow = [];
- var followers = document.querySelectorAll('.ProfileCard.js-actionable-user');
- followers.forEach(function(follower){
- var fol = {};
- fol["name"] = follower.querySelector('.fullname').textContent;
- fol["handle"] = follower.querySelector('.username b').textContent;
- fol["url"] = "http://twitter.com/" + fol["handle"];
- aFollow.push(fol);
- });
- myJSON = JSON.stringify(aFollow);
- }
- scroll();
- //Call myJSON in console and copy it, trying to print it throws an undefined because of the size.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement