[Tutor] Accessing a secured webpage

David Hutto smokefloat at gmail.com
Sat Jan 29 06:02:32 CET 2011


On Fri, Jan 28, 2011 at 11:30 PM, Steven D'Aprano <steve at pearwood.info> 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/python/articles/authentication.shtml


Void Space...You mean like the one between your ears...badumpchee.
Apologies I couldn't resist.

>
> or this French translation:
> http://www.voidspace.org.uk/python/articles/authentication_francais.shtml
>
>
>> I want to access it in batch via python but I could only found a basic
>> example:
>>
>> ||#||!/bin/env||  ||python|
>> |#||  ||-*-||  ||coding:||  ||utf-8||  ||-*-|
>>
>> |import|  urllib2
>> reponse|=|
>>  urllib2.|urlopen|(|'||http||:||/||/||www||.||kernel||.||org||/||'|)
>> xhtmldata|=|  reponse.|read|()
>> |for|  num,ligne|in|  |enumerate|(xhtmldata.|splitlines|()) :
>>    |print|  |"||%04d||  ||-||  ||%s||"||%|(num,ligne)
>> |
>
> I don't understand why your code has been filled with vertical pipe
> characters |
>
> --
> Steven
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
The lawyer in me says argue...even if you're wrong. The scientist in
me... says shut up, listen, and then argue. But the lawyer won on
appeal, so now I have to argue due to a court order.

Furthermore, if you could be a scientific celebrity, would you want
einstein sitting around with you on saturday morning, while you're
sitting in your undies, watching Underdog?...Or better yet, would
Einstein want you to violate his Underdog time?

Can you imagine Einstein sitting around in his underware? Thinking
about the relativity between his pubic nardsac, and his Fruit of the
Looms, while knocking a few Dorito's crumbs off his inner brilliant
white thighs, and hailing E = mc**2, and licking the orangy,
delicious, Doritoey crust that layered his genetically rippled
fingertips?

But then again, J. Edgar Hoover would want his pantyhose intertwined
within the equation.

However, I digress, momentarily.

But Einstein gave freely, for humanity, not for gain, other than
personal freedom.

An equation that benefited all, and yet gain is a personal product.

Also, if you can answer it, is gravity anymore than interplanetary static cling?


More information about the Tutor mailing list