import urllib.request
import urllib.error url = 'http://c.telunyun.com/Chart/getJsonData?market=1'
data = urllib.request.Request(url)
try:
data = urllib.request.urlopen(data)
print(data.read().decode('utf-8'))
except urllib.error.URLError as e:
print (e.code)
print (e.read().decode('utf-8'))