Newbie: urllib.urlretrieve()

David Fisher python at rose164.wuh.wustl.edu
Thu Apr 6 21:10:04 CEST 2000


Check out the websucker module in the tools/webchecker directory of the
source.  It mirrors a remote url locally.  If it doesn't do what you want,
it should at least point you in the right direction.

Good luck,
David

----- Original Message -----
From: "ez4gl" <ez4glNOezSPAM at hotmail.com.invalid>
Newsgroups: comp.lang.python
To: <python-list at python.org>
Sent: Thursday, April 06, 2000 1:54 PM
Subject: Newbie: urllib.urlretrieve()


> I'm trying to clone some Intranet pages for a contract
> assignment and thought Python would be a good tool because of
> it's urllib module.  However, when trying to use
> urllib.urlretrieve(), I have found that if you specify the
> second argument, the file for writing to has to already exist.
> What I want to do instead is create the name of the file on the
> fly, based on the name of the URL I'm retrieving.  I guess what
> I need to do is to create an empty file ahead of time?!  But how
> would I go about doing this under Windows? (Unix I could handle)
>
> Thanks in advance
>
> George
>
>
>
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network
*
> The fastest and easiest way to search and participate in Usenet - Free!
>
> --
> http://www.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list