Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Download web page including css files, images, etc.

by jhourcle (Prior)
on Jan 25, 2007 at 14:39 UTC ( [id://596496]=note: print w/replies, xml ) Need Help??


in reply to Download web page including css files, images, etc.

I think I can accomplish this with wget, but not directly:

  1. Download the single file.
  2. Figure out what wget called the file (should be only one text file in the directory structure)
  3. Tell wget to do a full mirror of the file
  4. link index.html to the file found in step #2

Obviously, this wouldn't be unique to wget -- you could use the logic with anything that can get all of the dependencies.

Update: bah ... you probably can't just symlink it, as if it has relative links it'll crap out ... you might have to then re-adjust the directory structure (there's a call to wget to get it to reduce the number of directories deep it goes ... you could figure out what to pass to wget in step #2, I guess)

  • Comment on Re: Download web page including css files, images, etc.

Replies are listed 'Best First'.
Re^2: Download web page including css files, images, etc.
by skx (Parson) on Jan 25, 2007 at 15:00 UTC

    Thanks, I think your approach is interesting. I will give it a try and only fall back to mangling and parsing myself if it doesn't work out.

    Steve
    --

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://596496]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 16:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found