Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
download imagebam galleries
#!/bin/bash/
# usage : ./imagebam-dl.sh <URL>
for i in `curl -s "$1" |grep 'a href'| egrep -o "http.*" |grep /image/ | cut -d "'" -f1 | cut -d '"' -f1` ; do FOLDER=$(echo $1 | cut -d '/' -f 5) ; curl -s "$i" | grep 'img id' | grep -o "http.*" | cut -d '"' -f1 | xargs wget -nv -nc -P imagebam_"$FOLDER"/ ; done
@Thoughtyness

This comment has been minimized.

Copy link

@Thoughtyness Thoughtyness commented Jul 26, 2017

I'm not sure it works anymore :(. Could someone try updating this or send me in the direction of a functioning one as of summer 2017?

@NotExist

This comment has been minimized.

Copy link

@NotExist NotExist commented Sep 29, 2017

for i in curl http://www.imagebam.com/gallery/alskdjflaskdjflaksjdlfkjasldkfj|grep "a href"|grep none|cut -d "'" -f2; do FOLDER=$(echo $1 |cut -d '/' -f 5); curl -s "$i"|grep 'download=1'|grep -v " "|grep -o "http.*"|cut -d '"' -f1 |xargs curl -O -J;done
Dont have wget on Mac, curl instead, no subfolder

@slrslr

This comment has been minimized.

Copy link

@slrslr slrslr commented May 30, 2021

it is not working, even after removing last "/" in #!/bin/bash/
it complains wget: missing URL
My input URL ($1) was like https://www.imagebam.com/gallery/stringhere
When i add "set -ex" intot he script beginning, it says:
+ xargs wget -nv -nc -P imagebam_stringhere/
@NotExist Your syntax does not appear to work either. Do you mind trying?

UPDATE: i think that the fix is to replace 'img id' by 'main-image' but script still likely need improving

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