Post Mon Nov 29, 2010 10:56 am

Accessing later levels from python level

Hi,

For levels before authentication I always fetched the source of the page by urllib.request.urlopen(#level url here)
Unfortunately since level with bees in the picture ( can't remember which one is this) I can't do that anymore because I keep getting HTTP 401 Error.
I can manage this when using internet browser because it just asks me about username and password and then I can just ask browser to show me the source but this way isn't exactly "programming" :)
My question is how do I do this authentication using python urllib (I am using python 3.1.2 but answers for previous versions of urllib/urllib2 would be fine too).
I tried to google simple authentication but there I always have to provide "realm", I have no idea what that is.
I tried to initialize HTTP session via http.client.HTTPConnection (because then supposedly I could be able to get server response with 'realm' specified) class but it seems I can't connect using those.

Can someone please give me some light ?