Skip to content

Instantly share code, notes, and snippets.

@rafa-br34
Created September 12, 2023 02:06
Show Gist options
  • Save rafa-br34/67f9d9a651e5b2ca5b7fbae8199a77a4 to your computer and use it in GitHub Desktop.
Save rafa-br34/67f9d9a651e5b2ca5b7fbae8199a77a4 to your computer and use it in GitHub Desktop.
Downloader for pixieset
var s = "["
for (let ImageElement of document.getElementsByTagName("img")) {
if (ImageElement.getAttribute("id")) {
let str = ImageElement.getAttribute("src")
s += `'${str.substr(2, str.length)}',`
}
}
s += "]"
c = `import shutil, requests\\ns=${s}\\ni=0\\nfor u in s:\\n\\tb = requests.get('https://'+(u.replace('-large.','-xxlarge.')), stream=True)\\n\\twith open(str(i)+'.png','wb') as f:\\n\\t\\tshutil.copyfileobj(b.raw,f)\\n\\t\\ti+=1`
console.log(`python -c "exec(\\"${c}\\")"`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment