Created
December 9, 2015 18:14
-
-
Save aripalo/1701ec3ffd740f8a9bdc to your computer and use it in GitHub Desktop.
Get Twitter list members' usernames into array (without using the API etc)
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
// 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