I want to t开发者_JAVA技巧ake a list of images from any web page(my task at university) using unix script. I am new at unix scripting, so all I managed to find was with command: w3m -dump http://www.myweb.com . But this command doesn't give me any html tags so I could know where the images are and to get them with grep. I also tried -dump_source, but it only gives some unknown symbols.
Can anybody help me with this?
You can download a file using this syntax:
wget -O destination-filename 'http://www.example.com'
If you want to pipe this file through another command, like grep
, just specify an output filename of -
:
wget -O - 'http://www.example.com'
If your goal is to download all of the images that a page uses, man wget
and have a look at the -p
option.
精彩评论