How to download a web page just like a web browser do ?

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Wed Aug 23 10:51:16 EDT 2006


In <1156343685.281636.285100 at p79g2000cwp.googlegroups.com>, Bo Yang wrote:

>     Everyday , I receive a newsletter from NYTimes , but I
> didn't want to read the news in evening the time the letter
> came in . So , I am about to download the web page
> contains the news and read them next morning ! I decide to
> use python to write a tool , which should be feeded with a
> URL , and then download the page to my disk . This
> function just like the Browser's "save as..." function . I
> know what shoud I do to accomplish that , I need to parse
> the web page , and download all pages in the page , and
> modify all the links to conrespond local disk links and ...

Why don't you just use the `wget` program.  Not written in Python but much
easier to use instead of writing the functionality yourself.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list