|
|
发表于 2025-11-1 10:51:48
|
显示全部楼层
广东省广州市
这个才对
|
| 文字识别API | 文本型 | | |
| Api_Key | 文本型 | | | | SECRET_KEY | 文本型 | | | | text | 文本型 | | | |
| 变量名 | 类 型 | 静态 | 数组 | 备 注 | | url | 文本型 | | | | json | 类_json | | | | data | 字节集 | | | | html | 文本型 | | | | headers | 文本型 | | | | ADD_协议头 | ADD_协议头 | | |
url = “https://aip.baidubce.com/rpc/2.0/nlp/v1/address?access_token=” + get_access_token (Api_Key )json. 置属性 (“text”, text )json. 置属性 (“ensure_ascii”, text )ADD_协议头. 添加 ("Content-Type","application/json") ADD_协议头. 添加 ("Accept","application/json") headers = ADD_协议头. 获取协议头数据 ()data = 网页_访问_对象 (url, 1, json. 取数据文本 (), , , headers )返回 (编码_Utf8到Ansi (data )) |
| get_access_token | 文本型 | | |
| API_KEY | 文本型 | | | | SECRET_KEY | 文本型 | | | |
| 变量名 | 类 型 | 静态 | 数组 | 备 注 | | url | 文本型 | | | | json | 类_json | | | | data | 字节集 | | | | html | 文本型 | | |
url = “https://aip.baidubce.com/oauth/2.0/token”json. 置属性 (“grant_type”, “client_credentials”)json. 置属性 (“client_id”, API_KEY )json. 置属性 (“client_secret”, SECRET_KEY )data = 网页_访问_对象 (url, 1, json. 取数据文本 ()) html = 到文本 (data ) 如果真 (json. 解析 (html )) 返回 (json. 取通用属性 (“access_token”)) 返回 (“”)
补充内容 (2025-11-1 11:23):
url = “https://aip.baidubce.com/rpc/2.0/nlp/v1/address?access_token=” + get_access_token (Api_Key,SECRET_KEY) |
评分
-
查看全部评分
|