Skip to content

Instantly share code, notes, and snippets.

@k0d3d
Last active January 28, 2025 17:39
Show Gist options
  • Select an option

  • Save k0d3d/3e03f677e669cce8cfd5aca00c320907 to your computer and use it in GitHub Desktop.

Select an option

Save k0d3d/3e03f677e669cce8cfd5aca00c320907 to your computer and use it in GitHub Desktop.
Export X Community Members
// Run these in your console. You need to have
// https://chromewebstore.google.com/detail/twcommunity-export-x-comm/ekmakfofejepagjcfllcfjapmhdeafdg?hl=en
// The extension helps request a new list of x handles at intervals
// run
const responses = [];
// then run
XMLHttpRequest.prototype.realSend = XMLHttpRequest.prototype.send;
XMLHttpRequest.prototype.send = function(data) {
this.realSend(data);
this.addEventListener('load', function() {
if (this.getResponseHeader('Content-Type').includes('application/json') && this.responseURL.startsWith('https://x.com/i/api/graphql')) {
responses.push(this.responseText);
console.log(this.responseText);
}
});
};
// then when you're ready to download, run
function downloadResponses() {
const text = responses.join('\n');
const blob = new Blob([text], { type: 'text/plain' });
const link = document.createElement('a');
link.href = URL.createObjectURL(blob);
link.download = 'responses.txt';
link.click();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment