diff --git a/genshin.py b/genshin.py index 0c90828..4b72979 100644 --- a/genshin.py +++ b/genshin.py @@ -12,7 +12,7 @@ from account import get_account_list class Genshin: def __init__(self) -> None: self.headers = setting.headers - self.headers['DS'] = tools.get_ds(web=True, web_old=False) + self.headers['DS'] = tools.get_ds(web=True) self.headers['Referer'] = 'https://webstatic.mihoyo.com/bbs/event/signin-ys/index.html?bbs_auth_required=true'\ f'&act_id={setting.genshin_Act_id}&utm_source=bbs&utm_medium=mys&utm_campaign=icon' self.headers['Cookie'] = config.config["account"]["cookie"] diff --git a/honkai2.py b/honkai2.py index 186d458..e5ef957 100644 --- a/honkai2.py +++ b/honkai2.py @@ -12,7 +12,7 @@ from account import get_account_list class Honkai2: def __init__(self) -> None: self.headers = setting.headers - self.headers['DS'] = tools.get_ds(web=True, web_old=False) + self.headers['DS'] = tools.get_ds(web=True) self.headers['Referer'] = 'https://webstatic.mihoyo.com/bbs/event/signin/bh2/index.html?bbs_auth_required' \ f'=true&act_id={setting.honkai2_Act_id}&bbs_presentation_style=fullscreen' \ '&utm_source=bbs&utm_medium=mys&utm_campaign=icon' diff --git a/honkai3rd.py b/honkai3rd.py index e918672..26e09a6 100644 --- a/honkai3rd.py +++ b/honkai3rd.py @@ -12,7 +12,7 @@ from account import get_account_list class Honkai3rd: def __init__(self) -> None: self.headers = setting.headers - self.headers['DS'] = tools.get_ds(web=True, web_old=False) + self.headers['DS'] = tools.get_ds(web=True) self.headers['Referer'] = 'https://webstatic.mihoyo.com/bbs/event/signin/bh3/index.html?bbs_auth_required' \ f'=true&act_id={setting.honkai3rd_Act_id}&bbs_presentation_style=fullscreen' \ '&utm_source=bbs&utm_medium=mys&utm_campaign=icon' diff --git a/mihoyobbs.py b/mihoyobbs.py index 51b69ff..b67a0a8 100644 --- a/mihoyobbs.py +++ b/mihoyobbs.py @@ -15,7 +15,7 @@ Have_coins = 0 class Mihoyobbs: def __init__(self): self.headers = { - "DS": tools.get_ds(web=False, web_old=False), + "DS": tools.get_ds(web=False), "cookie": f'stuid={config.config["account"]["stuid"]};stoken={config.config["account"]["stoken"]}', "x-rpc-client_type": setting.mihoyobbs_Client_type, "x-rpc-app_version": setting.mihoyobbs_Version, diff --git a/setting.py b/setting.py index d715cf5..e605685 100644 --- a/setting.py +++ b/setting.py @@ -1,10 +1,8 @@ # 米游社的Salt mihoyobbs_Salt = "z8DRIUjNDT7IT5IZXvrUAxyupA1peND9" mihoyobbs_Salt_web = "9nQiU3AV0rJSIBWgdynfoGMGKaklfbM7" -mihoyobbs_Salt_web_old = "h8w582wxwgqvahcdkpvdhbh2w9casgfl" # 米游社的版本 mihoyobbs_Version = "2.34.1" # Slat和Version相互对应 -mihoyobbs_Version_old = "2.3.0" # 米游社的客户端类型 mihoyobbs_Client_type = "2" # 1为ios 2为安卓 mihoyobbs_Client_type_web = "5" # 4为pc web 5为mobile web diff --git a/tearsofthemis.py b/tearsofthemis.py index d0b8a25..acfeaae 100644 --- a/tearsofthemis.py +++ b/tearsofthemis.py @@ -12,7 +12,7 @@ from account import get_account_list class Tears_of_themis: def __init__(self) -> None: self.headers = setting.headers - self.headers['DS'] = tools.get_ds(web=True, web_old=False) + self.headers['DS'] = tools.get_ds(web=True) self.headers['Referer'] = 'https://webstatic.mihoyo.com/bbs/event/signin/nxx/index.html?bbs_auth_required' \ '=true&bbs_presentation_style=fullscreen' \ f'act_id={setting.tearsofthemis_Act_id}' diff --git a/tools.py b/tools.py index 4709089..894568e 100644 --- a/tools.py +++ b/tools.py @@ -25,12 +25,9 @@ def timestamp() -> int: # 获取请求Header里的DS 当web为true则生成网页端的DS -def get_ds(web: bool, web_old: bool) -> str: +def get_ds(web: bool) -> str: if web: - if web_old: - n = setting.mihoyobbs_Salt_web_old - else: - n = setting.mihoyobbs_Salt_web + n = setting.mihoyobbs_Salt_web else: n = setting.mihoyobbs_Salt i = str(timestamp())