Friedrich Rentsch wrote:
> >>> ibm = urllib2.urlopen
> ("https://api.iextrading.com/1.0/stock/IBM/quote").read()
> >>> ibm = eval (ibm)
Dont do this. You are allowing the guys at iextrading.com to execute
arbitrary code on your machine. Use
ibm = json.loads(ibm)
instead or
import urllib.request, json
ibm = urllib.request.urlopen(
"https://api.iextrading.com/1.0/stock/IBM/quote"
).read()
ibm = json.loads(ibm.decode("utf-8"))
if you are using Python 3.
--
https://mail.python.org/mailman/listinfo/python-list