mirror of
https://github.com/WhaleFell/SMSBoom.git
synced 2026-02-03 10:23:22 +08:00
✨ feat: add 甜汤接口
This commit is contained in:
9
api.json
9
api.json
@@ -74,7 +74,7 @@
|
||||
"url": "https://pg.eeagd.edu.cn/ks/public/kszc/zcyzm.jsmeb",
|
||||
"method": "POST",
|
||||
"header": "",
|
||||
"data": "\"[phone]\""
|
||||
"data": "[phone]"
|
||||
},
|
||||
{
|
||||
"desc": "广东教育翔云",
|
||||
@@ -565,5 +565,12 @@
|
||||
"action": "register",
|
||||
"channel": "sms"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "甜糖app",
|
||||
"url": "http://tiantang.mogencloud.com/web/api/login/code?phone=[phone]",
|
||||
"method": "POST",
|
||||
"header": "",
|
||||
"data": ""
|
||||
}
|
||||
]
|
||||
Binary file not shown.
@@ -58,6 +58,10 @@ def sqlite2json():
|
||||
apis_ = []
|
||||
for api in apis:
|
||||
# print(api.url)
|
||||
if api.data is None:
|
||||
api.data = ""
|
||||
if api.header is None:
|
||||
api.header = ""
|
||||
data = {
|
||||
"desc": api.desc,
|
||||
"url": api.url,
|
||||
@@ -70,11 +74,10 @@ def sqlite2json():
|
||||
apis_.append(api.dict())
|
||||
except:
|
||||
pass
|
||||
|
||||
data = json.loads(json_path.read_text(encoding='utf8'))
|
||||
print(apis_)
|
||||
with open(json_path, mode="w", encoding="utf8") as j:
|
||||
try:
|
||||
json.dump(data, j, ensure_ascii=False, sort_keys=False)
|
||||
json.dump(apis_, j, ensure_ascii=False, sort_keys=False)
|
||||
logger.success("sqlite->json 成功!")
|
||||
except Exception:
|
||||
logger.exception("写入到 json 文件错误!")
|
||||
|
||||
Reference in New Issue
Block a user