/ Published in: Bash

The following command will download all the files with a JPG extension that are linked from http://flickr.com.
Requires the LWP and HTML::Tree Perl modules. You must also have Wget installed on your system for this to work.
Expand |
Embed | Plain Text
lwp-request -o links http://flickr.com/ | grep jpg | perl -pe "chomp; s/.*?(\S+jpg)/$1 /;" | xargs wget #or lwp-request -o links http://flickr.com | grep jpg | perl -pe "chomp; s/IMG\s*(.*jpg)/$1 /;" | xargs wget #The following will download the numbered images site.com/gallery/01.jpg through site.com/gallery/16.jpg perl -e "$i=0;while($i<16){open(WGET,qq/|xargs wget/);printf WGET qq{http://site.com/gallery/%02d.jpg},++$i}"
You need to login to post a comment.