urlretrieve a file whose name has spaces in it

H

HP

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top