views:

90

answers:

1

I'm trying to use urlretrieve to download files from urls that take the form:

http://example.com/download.php?id=6456&name=foo

yet for some reason I just get an empty response.

I've tried the method suggested in this question didn't seem to help because

remotefile.info()

doesn't contain the key 'content-disposition', only

['content-length', 'x-powered-by', 'refresh', 'server', 'connection', 'date', 'content-type']

Any suggestions?

+1  A: 

Information from manual:

info() — return the meta-information of the page, such as headers, in the form of an httplib.HTTPMessage instance (see Quick Reference to HTTP Headers)

What keys do you have in dict remotefile.info()?

Can you get a full header information?

Oduvan
Thanks, your answer put me on the right track to a solution. Looking at the response headers I found a url pointing me to the login page. Forgot I have to do that first
pufferfish