[Tutor] issues with urllib and loading a webpage.
sander.sweers at gmail.com
Tue Aug 23 21:57:28 CEST 2011
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)
> Now, if I were to do a data = response.read() and then print(data), I
> should get the source code printed (testing this on python.org works,
> btw). However, what I do get is:
> What gives?
Don't know, works fine for me..
More information about the Tutor