first commit

This commit is contained in:
2025-10-20 12:32:18 +08:00
commit 2cfd7c5a08
121 changed files with 254585 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
# encoding:utf-8
import requests
def get_tocken():
# client_id 为官网获取的AK client_secret 为官网获取的SK
host = 'https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=FyoTjwDbVU518TGN2BBgg3If&client_secret=zatBI2fmKwYHzIicsOh9X4OYRcXbtXsO'
response = requests.get(host)
if response:
return response.json()
else:
return "error"
if __name__ == '__main__':
host = 'https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=FyoTjwDbVU518TGN2BBgg3If&client_secret=zatBI2fmKwYHzIicsOh9X4OYRcXbtXsO'
response = requests.get(host)
print(response.json())