Skip to content

Instantly share code, notes, and snippets.

@spaghetti-
Last active January 15, 2017 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spaghetti-/bd4fcbc6cd3a9b55b02940e78d24fdeb to your computer and use it in GitHub Desktop.
Save spaghetti-/bd4fcbc6cd3a9b55b02940e78d24fdeb to your computer and use it in GitHub Desktop.
Download all images from a specified 4chan thread to disk, in parallel.
function 4get() {
curl -k -s $1 | egrep -o \
"\/\/is2\.4chan\.org\/gif\/\d+\.(webm|gif|jpeg|jpg|png)" | \
sed 's/^/https:/; s/is\d?\.4chan\.org/i\.4cdn\.org/' | uniq | \
xargs -n 1 -P 12 curl -# -O
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment