lwp-request -o links <a href="http://flickr.com/" >http://flickr.com/</a> | grep jpg | perl -pe "chomp; s/.*?(S+jpg)/$1 /;" | xargs wget
#or
lwp-request -o links <a href="http://flickr.com" >http://flickr.com</a> | grep jpg | perl -pe "chomp; s/IMGs*(.*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}"
Download linked JPEGs from a Web page, on the command line
Category: Uncategorized |
Tags: commandline, download, grabit, http, lwp, numbered, one-liners, perl, pipe, productivity, scraping, sequential, shortcut, textonly, tools, web
Leave a Reply
You must be logged in to post a comment.