Last active
October 2, 2024 04:43
-
-
Save tetchel/5c52c3b9bac80005ff0bb81f327023bd to your computer and use it in GitHub Desktop.
Get Sendage sends as JSON for backup, analysis etc.
This file contains 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
/** | |
* Usage: | |
* 1) Edit the username | |
* 2) Open https://sendage.com (required due to same origin policy) | |
* 3) Paste the following into into your browser developer tools console. | |
* It only finds public data. You don't have to be logged in. Use a private/incognito window if you like, it's not a phish. | |
* 4) The data will be printed to the console. | |
* You can right click the Array and click 'Copy Object' and then paste it into a file. | |
*/ | |
const username = 'tim-etchells'; | |
(async function sendage() { | |
const page = await fetch(`https://sendage.com/user/${username}`).then((res) => res.text()); | |
const doc = new DOMParser().parseFromString(page, 'text/html'); | |
const sends = JSON.parse(decodeURIComponent(doc.getElementById('sendlist').getAttribute('climbs'))); | |
return sends; | |
})() | |
.then(console.log) | |
.catch(console.error); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment