urlretrieve a file whose name has spaces in it
HP
hp at rentec.com
Tue Jul 29 18:39:30 EDT 2003
I am using urllib.urlretrieve() to download a file from a web site.
THe trouble is that the file name has spaces in it,
such as "string string1 foo.doc".
The statement:
urllib.urlretrieve("http://website.com/path/string string1 foo.doc",
"local_file");
produces local_file which contains the following one line:
<html><head><title>Error</title></head><body>The parameter is
incorrect. </body></html>
What is the correct way of specifying the this file in urlretrieve() ?
thanks
HP
More information about the Python-list
mailing list