requests遇到的错误
1,443错误 requests05
```python
port=443): Max retries exceeded with url:
/sug (Caused by NewConnectionError
('<urllib3.connection.VerifiedHTTPSConnection object
at 0x0000000003ABF518>: Failed to establish a new
connection: [Errno 11004] getaddrinfo failed',))
Process finished with exit code 1
**解决方法:从百度找了,只需要安装几个requests依赖包就可以
pip install cryptography
pip install pyOpenSSL
pip install certifi**
然后又报错
```python
for item in json_data['data']:
TypeError: string indices must be integers
这个错误意思是字符串的下标一定要是整数
原因是未把字符串转换为json对象 转换即可
将字符串转化为json对象
json_data = json.loads(json_data)
运行成功