mirror of
https://github.com/TDSCDMAA/AutoMihoyoBBS.git
synced 2026-06-04 11:28:47 +08:00
移除无法使用的旧版salt
This commit is contained in:
parent
eb34dadb75
commit
b17d3bf8f0
@ -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"]
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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}'
|
||||
|
||||
7
tools.py
7
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())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user