web log-in

I want to log into a site that requires my user name and password, I then want to automatically go to the page I need within the site and download some information.I have tried:-
urllib2.urlopen('https://www.whatever.com./members/loginpage?%s,%s' % (user, password))
but this only gets me the source of that page,any suggestions please?

Since every sites log-in is slightly different, and without the URL to test this I'm not sure how much any of us can help.

So what I'd sugest is that you look at the URLs what get shot around during login since one of these will probably send a cookie header, which you'll need to collect with your script and send when you want to access restricted pages.

I do have an example used to log into Devshed at home, which I'll attach when I get home next week. Or maybe one day soon I'll get around to writing an article on this .