Skip to content

Instantly share code, notes, and snippets.

@arlm
Created December 12, 2023 12:16
Show Gist options
  • Save arlm/4b5aa830c83a110aaff0e5b22af67a86 to your computer and use it in GitHub Desktop.
Save arlm/4b5aa830c83a110aaff0e5b22af67a86 to your computer and use it in GitHub Desktop.
var getProfileImage = async function () {
var header = document.querySelector("#app-mount > div > div > div:nth-child(3) > div > div > div > div > header");
var url = header.querySelector("div > div:nth-child(1) > div > svg > foreignObject > div > img").src;
var name = header.querySelector("div:nth-child(3)").innerText
return "curl " + url + " --output \"" +name + "." + url.substring(url.lastIndexOf('/') + 1, url.indexOf('?')).split('.').pop() + "\"";
};
await getProfileImage();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment