urllib question
Wladimir
gnufnork at fuckspam.hetdigitalegat.nl
Mon Jun 10 22:56:51 EDT 2002
On Tue, 11 Jun 2002 04:35:07 +0200, rdack wrote:
> this works but i don't understand it. it retrieves data from my router.
> params = urllib.urlencode({'RC': '@D', 'ACCT' : "root", 'PSWD' :
> "71:29:26", 'URL': 'admin' })
> ipurl = "http://" + iphost + "/cgi-bin/logi"
< urlfp = urllib.urlopen(ipurl, params)
>
> i was wondering exactly what those params mean. i have some other code
> that wants a user name and password and i don't know what to give it. is
> the username = 'root'? and what is the password? a string with 3 two
> digit numbers separated by colons?
So it passes four parameters to the script
[name] [value]
RC @D
ACCT root
PSWD 71:29:26
URL admin
What those parameters exactly mean is not a python issue but propetiary to
the router in question. (see router docs for that)
> what is the 'URL' param mean?
> somewhere to find documentation?
http://www.python.org/doc/current/lib/module-urllib.html would be a good
place to start :D
Wladimir
More information about the Python-list
mailing list