Re: [Tutor] issues with urllib and loading a webpage

2011-08-24 Thread Sander Sweers
On Wed, 24 Aug 2011, 00:03:23 CEST, Robert Sjoblom wrote: > > > Are you using Python 3 and urllib, and not using httplib2? Because I > > > honestly can't get urllib.request.urlopen to work with > > > http://www.boursorama.com/ -- I only get b'' from there. > > > > Yes, Python 3.2 which version

Re: [Tutor] issues with urllib and loading a webpage

2011-08-23 Thread Robert Sjoblom
>> Are you using Python 3 and urllib, and not using httplib2? Because I >> honestly can't get urllib.request.urlopen to work with >> http://www.boursorama.com/ -- I only get b'' from there. > > Yes, Python 3.2 which version one are you using? I tried both with > debug and without. Python 3.2.1 64

Re: [Tutor] issues with urllib and loading a webpage.

2011-08-23 Thread Sander Sweers
On 23 August 2011 22:59, Robert Sjoblom wrote: > Are you using Python 3 and urllib, and not using httplib2? Because I > honestly can't get urllib.request.urlopen to work with > http://www.boursorama.com/ -- I only get b'' from there. Yes, Python 3.2 which version one are you using? I tried both w

Re: [Tutor] issues with urllib and loading a webpage.

2011-08-23 Thread Robert Sjoblom
>Don't know, works fine for me.. > >Greets >Sander Are you using Python 3 and urllib, and not using httplib2? Because I honestly can't get urllib.request.urlopen to work with http://www.boursorama.com/ -- I only get b'' from there. best regards, Robert S. _

Re: [Tutor] issues with urllib and loading a webpage.

2011-08-23 Thread Sander Sweers
On 23/08/11 21:27, Robert Sjoblom wrote: Here's the code I'm working with: from http.client import HTTPConnection HTTPConnection.debuglevel = 1 from urllib.request import urlopen url = "http://www.boursorama.com/includes/cours/last_transactions.phtml?symbole=1xEURUS"; response = urlopen(url) pr

[Tutor] issues with urllib and loading a webpage.

2011-08-23 Thread Robert Sjoblom
So, an issue regarding urllib (python 3) came up earlier. I solved it by using httplib2 instead, but I'm rather curious as to why urllib wouldn't work. Here's the code I'm working with: from http.client import HTTPConnection HTTPConnection.debuglevel = 1 from urllib.request import urlopen url =