全部文档
当前文档

暂无内容

如果没有找到您期望的内容,请尝试其他搜索词

文档中心

代码示例

最近更新时间:2020-04-08 11:08:48

import requests
from requests_aws4auth import AWS4Auth
import time
import json
import hashlib
ak = 'your ak'
sk = 'your sk'
url = 'http://bri.api.ksyun.com'
region = 'cn-shanghai-3'
service = 'bri'
phones = ["15118376562","16573967191", "13470564531"]
usha1 = []
for phone in phones:
    phone = str(phone)
    phone = hashlib.sha1(phone.encode()).hexdigest()
    usha1.append(phone)
data = str(json.dumps(usha1))
params={"Action":"CheckPhone","Version":"2019-12-18","Data":data}
print('请求参数:')
print(params)
auth = AWS4Auth(ak, sk, 'cn-shanghai-3', 'bri')
response = requests.get(url,params=params, auth=auth)
print('响应内容:')
print(response.text)



文档导读
纯净模式常规模式

纯净模式

点击可全屏预览文档内容
文档反馈