如何在 json 对象中转换 https 请求?

我正在尝试关注此视频 https://youtu.be/xfzGZB4HhEE,但在时间戳 42:17 出现了一些错误,这是我的代码

symbol= 'AAPL'
api_url=f'https://sandbox.iexapis.com/stock/stable/{symbol}/quote/?token={IEX_CLOUD_API_TOKEN}'
data=requests.get(api_url).json()

错误

JSONDecodeError   Traceback (most recent call last)
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
daiwang2 回答:如何在 json 对象中转换 https 请求?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/4811.html

大家都在问