Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@brianloveswords
Last active November 3, 2017 22:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianloveswords/a3bf2503559114b0cdd772c68406e18c to your computer and use it in GitHub Desktop.
Save brianloveswords/a3bf2503559114b0cdd772c68406e18c to your computer and use it in GitHub Desktop.
Copy a CSV of your followers to your clipboard
// 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"),
);
@maniart
Copy link

maniart commented Oct 26, 2017

ah gotcha. its binary should be in the path.

@brianloveswords
Copy link
Author

brianloveswords commented Oct 26, 2017

@maniart copy() is a command that's in browser devtools, like clear(), that copies things to the clipboard.

@maniart
Copy link

maniart commented Nov 3, 2017

@brianloveswords AAAAH gotcha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment