mirror of
https://github.com/KimigaiiWuyi/GenshinUID.git
synced 2025-06-03 05:59:51 +08:00
更新错误反馈信息
This commit is contained in:
parent
56e99ec00c
commit
3f5cf907d3
65
getDB.py
65
getDB.py
@ -325,14 +325,6 @@ async def OwnerCookies(uid):
|
|||||||
return cookies
|
return cookies
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def random_hex(length):
|
def random_hex(length):
|
||||||
result = hex(random.randint(0,16**length)).replace('0x','').upper()
|
result = hex(random.randint(0,16**length)).replace('0x','').upper()
|
||||||
if len(result)<length:
|
if len(result)<length:
|
||||||
@ -379,7 +371,7 @@ async def GetDaily(Uid,ServerID="cn_gf01"):
|
|||||||
data = json.loads(req.text)
|
data = json.loads(req.text)
|
||||||
return data
|
return data
|
||||||
except:
|
except:
|
||||||
print("访问失败,请重试!")
|
print("访问每日信息失败,请重试!")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
async def GetSignList():
|
async def GetSignList():
|
||||||
@ -395,7 +387,8 @@ async def GetSignList():
|
|||||||
data = json.loads(req.text)
|
data = json.loads(req.text)
|
||||||
return data
|
return data
|
||||||
except:
|
except:
|
||||||
print("访问失败,请重试!")
|
im = "获取签到奖励列表失败,请重试"
|
||||||
|
print(im)
|
||||||
|
|
||||||
async def GetSignInfo(Uid,ServerID="cn_gf01"):
|
async def GetSignInfo(Uid,ServerID="cn_gf01"):
|
||||||
if Uid[0] == '5':
|
if Uid[0] == '5':
|
||||||
@ -413,7 +406,8 @@ async def GetSignInfo(Uid,ServerID="cn_gf01"):
|
|||||||
data = json.loads(req.text)
|
data = json.loads(req.text)
|
||||||
return data
|
return data
|
||||||
except:
|
except:
|
||||||
print("访问失败,请重试!")
|
im = "获取签到信息失败,请重试"
|
||||||
|
print(im)
|
||||||
|
|
||||||
async def MysSign(Uid,ServerID="cn_gf01"):
|
async def MysSign(Uid,ServerID="cn_gf01"):
|
||||||
if Uid[0] == '5':
|
if Uid[0] == '5':
|
||||||
@ -437,7 +431,8 @@ async def MysSign(Uid,ServerID="cn_gf01"):
|
|||||||
data2 = json.loads(req.text)
|
data2 = json.loads(req.text)
|
||||||
return data2
|
return data2
|
||||||
except:
|
except:
|
||||||
print("访问失败,请重试!")
|
im = { 'message' : '签到失败,请重试'}
|
||||||
|
return im
|
||||||
|
|
||||||
async def GetAward(Uid,ServerID="cn_gf01"):
|
async def GetAward(Uid,ServerID="cn_gf01"):
|
||||||
if Uid[0] == '5':
|
if Uid[0] == '5':
|
||||||
@ -457,7 +452,9 @@ async def GetAward(Uid,ServerID="cn_gf01"):
|
|||||||
data = json.loads(req.text)
|
data = json.loads(req.text)
|
||||||
return data
|
return data
|
||||||
except:
|
except:
|
||||||
print("访问失败,请重试!")
|
im = "访问每月统计失败,请重试!"
|
||||||
|
print(im)
|
||||||
|
return im
|
||||||
#sys.exit(1)
|
#sys.exit(1)
|
||||||
|
|
||||||
async def GetInfo(Uid,ck,ServerID="cn_gf01"):
|
async def GetInfo(Uid,ck,ServerID="cn_gf01"):
|
||||||
@ -477,7 +474,7 @@ async def GetInfo(Uid,ck,ServerID="cn_gf01"):
|
|||||||
data = json.loads(req.text)
|
data = json.loads(req.text)
|
||||||
return data
|
return data
|
||||||
except:
|
except:
|
||||||
print("访问失败,请重试!")
|
print("获取信息失败,请重试!")
|
||||||
#sys.exit(1)
|
#sys.exit(1)
|
||||||
|
|
||||||
async def GetSpiralAbyssInfo(Uid, ck,Schedule_type="1",ServerID="cn_gf01"):
|
async def GetSpiralAbyssInfo(Uid, ck,Schedule_type="1",ServerID="cn_gf01"):
|
||||||
@ -500,7 +497,7 @@ async def GetSpiralAbyssInfo(Uid, ck,Schedule_type="1",ServerID="cn_gf01"):
|
|||||||
data = json.loads(req.text)
|
data = json.loads(req.text)
|
||||||
return data
|
return data
|
||||||
except:
|
except:
|
||||||
print("1访问失败,请重试!")
|
print("1获取深渊信息失败,请重试!")
|
||||||
#sys.exit(1)
|
#sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
@ -524,7 +521,7 @@ def GetCharacter(Uid,Character_ids, ck,ServerID="cn_gf01"):
|
|||||||
data2 = json.loads(req.text)
|
data2 = json.loads(req.text)
|
||||||
return data2
|
return data2
|
||||||
except:
|
except:
|
||||||
print("访问失败,请重试!")
|
print("获取人物信息失败,请重试!")
|
||||||
#sys.exit(1)
|
#sys.exit(1)
|
||||||
|
|
||||||
async def GetMysInfo(mysid,ck):
|
async def GetMysInfo(mysid,ck):
|
||||||
@ -542,7 +539,8 @@ async def GetMysInfo(mysid,ck):
|
|||||||
data = json.loads(req.text)
|
data = json.loads(req.text)
|
||||||
return data
|
return data
|
||||||
except:
|
except:
|
||||||
im = "err"
|
im = "err,获取米游社信息失败,请重试!"
|
||||||
|
print(im)
|
||||||
return im
|
return im
|
||||||
|
|
||||||
async def GetWeaponInfo(name):
|
async def GetWeaponInfo(name):
|
||||||
@ -556,17 +554,22 @@ async def GetWeaponInfo(name):
|
|||||||
return data
|
return data
|
||||||
|
|
||||||
async def GetCharInfo(name,mode = 0):
|
async def GetCharInfo(name,mode = 0):
|
||||||
str = ""
|
try:
|
||||||
if mode == 1:
|
str = ""
|
||||||
str = "&talents=1"
|
if mode == 1:
|
||||||
elif mode == 2:
|
str = "&talents=1"
|
||||||
str = "&constellations=1"
|
elif mode == 2:
|
||||||
|
str = "&constellations=1"
|
||||||
async with AsyncClient() as client:
|
|
||||||
req = await client.get(
|
async with AsyncClient() as client:
|
||||||
url="https://genshin.minigg.cn/?char=" + name + str,
|
req = await client.get(
|
||||||
headers={
|
url="https://genshin.minigg.cn/?char=" + name + str,
|
||||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36',
|
headers={
|
||||||
'Referer': 'https://genshin.minigg.cn/index.html'})
|
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36',
|
||||||
data = json.loads(req.text)
|
'Referer': 'https://genshin.minigg.cn/index.html'})
|
||||||
return data
|
data = json.loads(req.text)
|
||||||
|
return data
|
||||||
|
except:
|
||||||
|
im = "获取人物信息失败,请重试!"
|
||||||
|
print(im)
|
||||||
|
return im
|
||||||
|
Loading…
x
Reference in New Issue
Block a user