Skip to content

Instantly share code, notes, and snippets.

@aripalo
Created December 9, 2015 18:14
Show Gist options
  • Save aripalo/1701ec3ffd740f8a9bdc to your computer and use it in GitHub Desktop.
Save aripalo/1701ec3ffd740f8a9bdc to your computer and use it in GitHub Desktop.
Get Twitter list members' usernames into array (without using the API etc)
// 1. Scroll down the list members page:
// https://twitter.com/:username/lists/:slug/members
// ProTip™: keep holding down page down button and wait until you reach the end/bottom of the list
// 2. Paste this to dev tools console
var nodeListOfUsers = document.querySelectorAll('#timeline .username');
var listOfUsernames = Array.prototype.slice.call(nodeListOfUsers).map((node) => node.innerText);
// 3. now you got the list members in array at listOfUsernames variable
// make sure it's length equals the members amount visible in Twitter website
listOfUsernames.lenght
// 4. do what ever you want with it
console.log(listOfUsernames)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment