For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > April 2005 > Download a HTML page with images?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Download a HTML page with images?
Fergus McMenemie

2005-04-25, 8:58 am

Hi,

I am wanting to download or mirror a series of individual HTML pages,
not a whole site. How do you do this with perl? I have looked at LWP
mirror and w3mir neither of which seem to do this. mirror does not
download assocated images, w3mir insists on placing everything at the
root and does not have an option to download a single page with images,
style sheets etc.


--
Fergus McMenemie Email:fergus@twig.demon.co.uk.
Techmore Ltd Phone:(UK) 07721 376021

Unix/Mac/Intranets Analyst Programmer
David K. Wall

2005-04-25, 3:58 pm

Fergus McMenemie <fergus@twig.demon.co.uk> wrote:

> I am wanting to download or mirror a series of individual HTML
> pages, not a whole site. How do you do this with perl? I have
> looked at LWP mirror and w3mir neither of which seem to do this.
> mirror does not download assocated images, w3mir insists on
> placing everything at the root and does not have an option to
> download a single page with images, style sheets etc.


Instead of trying to reimplement this in Perl, why not use the GNU wget
program? 'wget -p http://example.dns/page.html' should do it.

(The -p option "causes Wget to download all the files that are
necessary to properly display a given HTML page. This includes such
things as inlined images, sounds, and referenced stylesheets.")
Fergus McMenemie

2005-04-26, 3:59 am

David K. Wall <darkon.tdo@gmail.com> wrote:

> Fergus McMenemie <fergus@twig.demon.co.uk> wrote:
>
>
> Instead of trying to reimplement this in Perl, why not use the GNU wget
> program? 'wget -p http://example.dns/page.html' should do it.
>
> (The -p option "causes Wget to download all the files that are
> necessary to properly display a given HTML page. This includes such
> things as inlined images, sounds, and referenced stylesheets.")



Thanks very much; available for UNIX and Windows as well, that will
do nicely! I guess I am so used to being able to do everything in Perl
that I did not properly consider the alternatives :-)

--
Fergus McMenemie Email:fergus@twig.demon.co.uk.
Techmore Ltd Phone:(UK) 07721 376021

Unix/Mac/Intranets Analyst Programmer
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com