Created
August 9, 2014 15:33
-
-
Save jadedgnome/b409c0c2d897a598a083 to your computer and use it in GitHub Desktop.
download imagebam galleries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
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
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