Re: HTTP Authentication using urllib2

2009-04-24 Thread Wojtek Walczak
On Fri, 24 Apr 2009 04:25:20 -0700 (PDT), Lakshman wrote: > I am trying to authenticate using urllib2. The basic authentication > works if I hard code authheaders. ... > except IOError, e: > print "Something wrong. This shouldnt happen" First of all, don't shoot yourself in the foot an

HTTP Authentication using urllib2

2009-04-24 Thread Lakshman
I am trying to authenticate using urllib2. The basic authentication works if I hard code authheaders. def is_follows(follower, following): theurl = 'http://twitter.com/friendships/exists.json? user_a='+follower+'&user_b='+following username = 'uname1' password = 'pwd1' handle = ur