thank you for that tip. I missed that somehow...

На 16 май 2018 г. 16:31:37 GMT+02:00, Peter Otten <__pete...@web.de> написа:
>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
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to