Tuesday, June 15, 2010

wget extract url from a file

SkyHi @ Tuesday, June 15, 2010
if we were to try the same thing on the output of
Code:
lynx --dump URL>somefile
i.e. something w/o html tags; further assuming the potential presence of more than one URL per line, could we use
Code:
sed 's/http/\^http/g' somefile | tr -s "^" "\n" | grep http| sed 's/\ .*//g'
http://farm2.static.flickr.com/0ooo6/1o0574e9f_o.jpg"
http://farm3.static.flickr.com/6oo1/2coo3a_b.jpg"

#cut -f1 -d '"' somefile
Then #wget :) for i in `cat file.txt` do wget $i done

OR Windows SW:
http://wareseeker.com/download/gurus-URL-Grabber-1.0.rar/8038104


REFERENCES
http://forums.macosxhints.com/showthread.php?t=13457