1. 内容回顾
前面主要是对如何获取百度接口密匙和连接许可的问题,代码如下
# 导入相关工具包
import requests
import json
import warnings
warnings.filterwarnings('ignore') # 设置不弹出警告
# 获取Access Token
host = 'https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=【官网获取的AK】&client_secret=【官网获取的SK】'
response = requests.get(host