Paul Lynch
11/30/2006 9:57:00 AM
On 29 Nov 2006, at 20:09, Alex Ciarlillo wrote:
> Okay I got some code working to login to the site Im interested in,
> but
> this led me to a new question. How can I keep this session alive once
> logged in? After login I need to follow a link on the page in order to
> start posting data to get my reports but I believe the connection is
> closing as soon as it posts the login data. I think this requires a
> stand alone http object which then processes each request but I havent
> had any luck getting this code to work like that.
At the risk of incurring the ire of another Paul :-), you may be
better off using an external library that can handle this for you. I
have used Mechanize in similar situations with great success.
The problem you are facing, most likely, is that you need to carry
out further actions to maintain the session. This is often something
like receiving and replying with a cookie. I'd be interested to see
if there is a simple way to do this, outside of using Mechanize.
Paul