Last active
November 3, 2017 22:47
-
-
Save brianloveswords/a3bf2503559114b0cdd772c68406e18c to your computer and use it in GitHub Desktop.
Copy a CSV of your followers to your clipboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// put this in the console on https://twitter.com/<username/followers | |
timer = setInterval(() => window.scrollTo(0, document.body.scrollHeight), 100); | |
// wait until the document stops scrolling... | |
clearInterval(timer); | |
// this will copy the CSV to your clipboard | |
copy( | |
[...document.querySelectorAll(".ProfileCard-userFields")] | |
.map(e => ({ | |
name: e.querySelector("a.fullname").innerText, | |
screenname: e.querySelector(".username").innerText, | |
bio: e.querySelector(".ProfileCard-bio").innerText, | |
})) | |
.map(f => | |
[ | |
JSON.stringify(f.name), | |
JSON.stringify(f.screenname), | |
JSON.stringify(f.bio), | |
].join(","), | |
) | |
.join("\n"), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@brianloveswords what's
copy
?