[twill] About cookies using twill

Alexandre Filgueira faidoc at gmail.com
Fri Jan 28 11:59:56 PST 2011


Hi, I'm working on a little project I have to use cookies, but I didn't
found how to do it.

The program get into a login page and then it fills the login form. But
after 5 minutes, you are not longer logged in. What I did was to use a loop
and a sleep, but I guess this could be solved using cookies. Could anyone
help me please?

Thanks

Here is some code

while 1:
go('
https://172.16.0.1:8090/corporate/webpages/httpclientlogin.jsp?loginstatus=null&logoutstatus=null&message=null&liverequesttime=null&livemessage=null&$
')
try:
fv("1", "username", usuario)
fv("1", "password", clave)

submit('0')
except urllib2.HTTPError, e:
sys.exit("%d: %s" % (e.code, e.msg))
except IOError, e:
print e
except:
pass
time.sleep(240)


-- 
Alexandre Filgueira
www.linuxeame.net

PGP: http://www.linuxeame.net/gpg/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/twill/attachments/20110128/b1fde600/attachment.htm>


More information about the twill mailing list