Re: [Tutor] getting binary file from website with custom header

2011-01-29 Thread Steven D'Aprano
Alex Hall wrote: What makes you think you should use the *hex* digest of the password, rather than some other format? Honestly, it seemed the logical choice, and the api docs to not say anything except to md5Sum() the password. I have tried it with and without the hexdigest() and nothing change

Re: [Tutor] getting binary file from website with custom header

2011-01-29 Thread Alex Hall
On 1/29/11, Steven D'Aprano wrote: > Alex Hall wrote: > >> Sorry. http://api.bookshare.org. > > Hmmm, I get: > > 403 Developer Inactive > > so that's no help to me. However, I did find this: > > http://developer.bookshare.org/docs/Home/ > > [quote] > For user authenticated services, the user's use

Re: [Tutor] getting binary file from website with custom header

2011-01-28 Thread Steven D'Aprano
Alex Hall wrote: Sorry. http://api.bookshare.org. Hmmm, I get: 403 Developer Inactive so that's no help to me. However, I did find this: http://developer.bookshare.org/docs/Home/ [quote] For user authenticated services, the user's username will be passed in via the for parameter in the en

Re: [Tutor] getting binary file from website with custom header

2011-01-28 Thread Alex Hall
On 1/29/11, Steven D'Aprano wrote: > A few more comments... > > Alex Hall wrote: >> Hello, >> I am continuing to work on that api wrapper... I never realized how >> little I know about urllib/urllib2! The idea of downloading from the >> api is pretty easy: give it a url and a password and it gives

Re: [Tutor] getting binary file from website with custom header

2011-01-28 Thread Steven D'Aprano
A few more comments... Alex Hall wrote: Hello, I am continuing to work on that api wrapper... I never realized how little I know about urllib/urllib2! The idea of downloading from the api is pretty easy: give it a url and a password and it gives you the book. Here is a quote from the api documen

Re: [Tutor] getting binary file from website with custom header

2011-01-28 Thread Steven D'Aprano
Alex Hall wrote: I keep getting an error 403, which the api defines as a bad login attempt. This could mean anything. Perhaps your password is wrong. Perhaps your username is wrong. Perhaps the website is sniffing the user-agent and refusing to allow Python to connect. Try setting the user-

[Tutor] getting binary file from website with custom header

2011-01-28 Thread Alex Hall
Hello, I am continuing to work on that api wrapper... I never realized how little I know about urllib/urllib2! The idea of downloading from the api is pretty easy: give it a url and a password and it gives you the book. Here is a quote from the api documentation: In addition the MD5 hash of the end