urlretrieve a file whose name has spaces in it
Marnanel
usenet at marnanel.org
Tue Jul 29 19:00:29 EDT 2003
> 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() ?
Have you tried
urllib.urlretrieve("http://website.com/path/string%20string1%20foo.doc",
"local_file"); ? (URLs can't really contain unescaped spaces.)
M
More information about the Python-list
mailing list