Re: [Tutor] Accessing a secured webpage

2011-01-28 Thread Steven D'Aprano
David Hutto wrote: You should read this: http://www.voidspace.org.uk/python/articles/authentication.shtml Void Space...You mean like the one between your ears...badumpchee. Apologies I couldn't resist. I'm sure you really could have, if you tried *wink* Michael Foord of Voidspace is a hig

Re: [Tutor] Accessing a secured webpage

2011-01-28 Thread David Hutto
On Fri, Jan 28, 2011 at 11:30 PM, Steven D'Aprano wrote: > Karim wrote: >> >> Hello, >> >> I want to create a client to access a webpage. But when I access it >> interactively  there is a dialog box >> which ask for login and password. > > You should read this: > > http://www.voidspace.org.uk/pyth

Re: [Tutor] Accessing a secured webpage

2011-01-28 Thread Steven D'Aprano
Karim wrote: Hello, I want to create a client to access a webpage. But when I access it interactively there is a dialog box which ask for login and password. You should read this: http://www.voidspace.org.uk/python/articles/authentication.shtml or this French translation: http://www.void

Re: [Tutor] Accessing a secured webpage

2011-01-28 Thread Karim
Thanks Ian! This is a simple one! I found this other way said more flexible, I must check it too: *import urllib class myURLOpener(urllib.FancyURLopener): def setpasswd(self, user, passwd): self.__user = user self.__passwd = passwd def prompt_user_passwd(self, host, r

Re: [Tutor] Accessing a secured webpage

2011-01-28 Thread Karim
Vince I saw your answer on the related subject fron October 2010 : *Re: [Tutor] Requesting restricted URL (further authentication requested)*. Thanks Karim On 01/28/2011 11:05 PM, Vince Spicer wrote: You may want to look at httplib2 http://code.google.com/p/httplib2/ This great module make

Re: [Tutor] Accessing a secured webpage

2011-01-28 Thread ian douglas
If it's HTTP basic_auth, you could try this method too: http://username:passw...@domain.com/page.html On 01/28/2011 01:54 PM, Karim wrote: Hello, I want to create a client to access a webpage. But when I access it interactively there is a dialog box which ask for login and password. I wan

Re: [Tutor] Accessing a secured webpage

2011-01-28 Thread Vince Spicer
You may want to look at httplib2 http://code.google.com/p/httplib2/ This great module makes auth very simple Vince On Fri, Jan 28, 2011 at 3:54 PM, Karim wrote: > > Hello, > > I want to create a client to access a webpage. But when I access it > interactively there is a dialog box > which as

[Tutor] Accessing a secured webpage

2011-01-28 Thread Karim
Hello, I want to create a client to access a webpage. But when I access it interactively there is a dialog box which ask for login and password. I want to access it in batch via python but I could only found a basic example: ||#||!/bin/env|| ||python| |#|| ||-*-|| ||coding:|| ||utf-8||