Re: how to browse using urllib2 and cookeilib the correct way

2006-04-26 Thread John J. Lee
Edward Elliott <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: > > can anybody explain, in the first case why i need to do two attempts. > > I would guess it's because redhat requires your browser to submit a session > cookie with the login form. In the urllib2 example, the first request

Re: how to browse using urllib2 and cookeilib the correct way

2006-04-26 Thread John J. Lee
[EMAIL PROTECTED] writes: [...] > 1) >>>import urllib2,urllib,cookielib > 2) >>>cj = cookielib.CookieJar() > 3) >>>opener = urllib2.build_opener( urllib2.HTTPCookieProcessor(cj)) > 4) >>>data = urllib.urlencode ( { "username" : "user" , >"password" :"" } ) > 5) >>>fp = opener.open( > "h

Re: how to browse using urllib2 and cookeilib the correct way

2006-04-25 Thread jnair
ok , got it . Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: how to browse using urllib2 and cookeilib the correct way

2006-04-25 Thread Edward Elliott
[EMAIL PROTECTED] wrote: > can anybody explain, in the first case why i need to do two attempts. I would guess it's because redhat requires your browser to submit a session cookie with the login form. In the urllib2 example, the first request you make tries to submit login form data directly. Si