Skip to content

Instantly share code, notes, and snippets.

@Gruppio
Created November 10, 2018 11:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Gruppio/f2fbc50f3c3282a0f291bfd9b062e5d6 to your computer and use it in GitHub Desktop.
Save Gruppio/f2fbc50f3c3282a0f291bfd9b062e5d6 to your computer and use it in GitHub Desktop.
Downloads images from RedBubble.com with a dimension of 512x512 and black background
#!/bin/bash
# Pass as parameter a redbubble image link like https://ih1.redbubble.net/image.379381203.9755/st%2Csmall%2C420x460-pad%2C420x460%2Cf8f8f8.lite-1u2.jpg
url="$1"
newUrl=${url//420/512}
newUrl=${newUrl//460/512}
newUrl=${newUrl//f8/00}
curl "$newUrl" > "$(uuidgen).jpg"
@JamesHopbourn
Copy link

JamesHopbourn commented Sep 27, 2021

single line solution, copy url and run below command:

pbpaste|sed 's/420/512/g ; s/460/512/g ; s/f8/00/g'|xargs curl -so "$(uuidgen).jpg"

@swhslasam
Copy link

How do I set up to download large image pixels?

@DefriBachtian93
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment