Last active
November 3, 2017 22:47
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
@maniart
copy()
is a command that's in browser devtools, likeclear()
, that copies things to the clipboard.