Re: how to add login info while opening url

2010-10-12 Thread Bill Freeman
IIRC, you will need to use urllib2 and provide a "urlopener" that handles the 403 and responds with the credentials. The more recent python (e.g.2.6) documentation is pretty clear about it. Again, from memory. Bill On Tue, Oct 12, 2010 at 1:52 PM, harryos wrote: > mm..I tried that..it gives 40

Re: how to add login info while opening url

2010-10-12 Thread harryos
mm..I tried that..it gives 403 error.. I don't think putting login info in request will help..that will work only for 401 I believe.. not sure how to handle 403 from server..Any comments guys? harry On Oct 12, 6:19 pm, jimgardener wrote: > hi > I was trying to get data from different web pages u

how to add login info while opening url

2010-10-12 Thread jimgardener
hi I was trying to get data from different web pages using urlopen and read. from urllib import urlopen def get_page_data(url): f=urlopen(url) return f.read() when I gave this url ,it produces a 'forbidden' response print get_page_data('http://groups.google.com/group/django-users/ topics