how can i pass through authrization box when i use urllib module?

Peter Stibrany stibrany at tenax.sk
Thu Aug 17 06:23:16 EDT 2000


On Thu 17.08.2000, 02:43 +0000, Cho Yoonbae wrote:
> 
> hi,
Hi.

> i'm making a client program which is update my dynamic ip to dns automatically.
> 
> i want to open such a web page.
> but it shows authrization box to me when i enter.
> 
> i am trying to solve this problem with urllib module.
> but, i couldn't find passing tools about authrization.
> 
> is there module or argument about that problem?

what about this...
	web=urllib.urlopen('http://user:password@www.somewhere.net/')
	print web.readlines()

Also in interactive python, you can do this:

$ python
Python 1.5.2 (#1, Dec  8 1999, 21:20:51)  [GCC 2.95.2 19991024 (release)] on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import urllib
>>> a=urllib.urlopen('http://ns.ncinet.local/')
Enter username for router-hattalova at ns.ncinet.local: someone
Enter password for someone in router-hattalova at ns.ncinet.local: <password>

> 
> have a good day.
> byebye~

-cipso




More information about the Python-list mailing list