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)
print(response.headers.as_string())
print(type(response))
<snip>
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:
b''

What gives?

Don't know, works fine for me..

Greets
Sander
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to