Google Gruppi non supporta più i nuovi post o le nuove iscrizioni Usenet. I contenuti storici continuano a essere visibili.

Re: Auto Logon to site and get page

5 visualizzazioni
Passa al primo messaggio da leggere

Stephen Hansen

da leggere,
1 feb 2009, 22:34:4601/02/09
a jsmit...@yahoo.com, pytho...@python.org
> This doesn't however, it just sends me back to the main login page, doenst
> say invalid password or anything. I've checked, yes the python hmac hash
> function produces the same results (encrypted password) as the md5.js file.
> Does anyone know what I am doing wrong??

My guess? After you successfully login the webpage is setting a cookie
on your browser with a token to mark you as authenticated and let you
in. Lots of websites do that: I don't think urllib2 is handling that
by itself so you may need to. You also may have to set a User-agent
header to convince it you're legitimate.

I googled briefly and came up with
http://www.voidspace.org.uk/python/articles/cookielib.shtml which may
be totally useless or of great value. I am not providing it as a
solution, it just at a brief glance looks potentially relevant :)

--S

0 nuovi messaggi