[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

how to make webfetcher download images

sean_n

12/7/2006 5:05:00 AM

The following script uses WebFetcher to recursively download html
files. But the html pages are missing their jpg images. Any
suggestions?


require 'webfetcher'
book =
WebFetcher::Page.url('http://www.american-lawns.com/grasses/grasses....)
book.recurse.save('grass')
# save all files into a subfolder called grass.

1 Answer

sean_n

12/7/2006 7:03:00 AM

0


never mind, i figured it out.

the jpg files were stored in a folder path that was at the same depth
as the folder i was downloading. i'm guessing webfetcher will exclude
those files.

so here's the solution:


require 'webfetcher'
page = WebFetcher::Page.url('http://www.american-lawn...)
page.recurse.save('grass')