header头修改
This commit is contained in:
parent
f455a56ecd
commit
7b3e3ea045
22
genshin.py
22
genshin.py
@ -11,22 +11,12 @@ from account import get_account_list
|
|||||||
|
|
||||||
class Genshin:
|
class Genshin:
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self.headers = {
|
self.headers = setting.headers
|
||||||
'Accept': 'application/json, text/plain, */*',
|
self.headers['DS'] = tools.get_ds(web=True, web_old=True)
|
||||||
'DS': tools.get_ds(web=True, web_old=True),
|
self.headers['Referer'] = 'https://webstatic.mihoyo.com/bbs/event/signin-ys/index.html?bbs_auth_required=true'\
|
||||||
'Origin': 'https://webstatic.mihoyo.com',
|
f'&act_id={setting.genshin_Act_id}&utm_source=bbs&utm_medium=mys&utm_campaign=icon'
|
||||||
'x-rpc-app_version': setting.mihoyobbs_Version_old,
|
self.headers['Cookie'] = config.config["account"]["cookie"]
|
||||||
'User-Agent': 'Mozilla/5.0 (Linux; Android 9; Unspecified Device) AppleWebKit/537.36 (KHTML, like Gecko) '
|
self.headers['x-rpc-device_id'] = tools.get_device_id()
|
||||||
'Version/4.0 Chrome/39.0.0.0 Mobile Safari/537.36 miHoYoBBS/2.3.0',
|
|
||||||
'x-rpc-client_type': setting.mihoyobbs_Client_type_web,
|
|
||||||
'Referer': 'https://webstatic.mihoyo.com/bbs/event/signin-ys/index.html?bbs_auth_required=true&act_id'
|
|
||||||
f'={setting.genshin_Act_id}&utm_source=bbs&utm_medium=mys&utm_campaign=icon',
|
|
||||||
'Accept-Encoding': 'gzip, deflate',
|
|
||||||
'Accept-Language': 'zh-CN,en-US;q=0.8',
|
|
||||||
'X-Requested-With': 'com.mihoyo.hyperion',
|
|
||||||
"Cookie": config.config["account"]["cookie"],
|
|
||||||
'x-rpc-device_id': tools.get_device_id()
|
|
||||||
}
|
|
||||||
self.acc_List = get_account_list("hk4e_cn", self.headers)
|
self.acc_List = get_account_list("hk4e_cn", self.headers)
|
||||||
if len(self.acc_List) != 0:
|
if len(self.acc_List) != 0:
|
||||||
self.sign_Give = self.get_signgive()
|
self.sign_Give = self.get_signgive()
|
||||||
|
24
honkai2.py
24
honkai2.py
@ -11,22 +11,12 @@ from account import get_account_list
|
|||||||
|
|
||||||
class Honkai2:
|
class Honkai2:
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self.headers = {
|
self.headers = setting.headers
|
||||||
'Accept': 'application/json, text/plain, */*',
|
self.headers['DS'] = tools.get_ds(web=True, web_old=True)
|
||||||
'DS': tools.get_ds(web=True, web_old=True),
|
self.headers['Referer'] = 'https://webstatic.mihoyo.com/bbs/event/signin/bh2/index.html?bbs_auth_required'\
|
||||||
'Origin': 'https://webstatic.mihoyo.com',
|
f'=true&act_id={setting.honkai2_Act_id}&bbs_presentation_style=fullscreen'\
|
||||||
'x-rpc-app_version': setting.mihoyobbs_Version_old,
|
'&utm_source=bbs&utm_medium=mys&utm_campaign=icon'
|
||||||
'User-Agent': 'Mozilla/5.0 (Linux; Android 9; Unspecified Device) AppleWebKit/537.36 (KHTML, like Gecko) '
|
self.headers['Cookie'] = config.config["account"]["cookie"]
|
||||||
'Version/4.0 Chrome/39.0.0.0 Mobile Safari/537.36 miHoYoBBS/2.3.0',
|
self.headers['x-rpc-device_id'] = tools.get_device_id()
|
||||||
'x-rpc-client_type': setting.mihoyobbs_Client_type_web,
|
|
||||||
'Referer': 'https://webstatic.mihoyo.com/bbs/event/signin/bh2/index.html?bbs_auth_required=true&'
|
|
||||||
f'act_id={setting.honkai2_Act_id}&bbs_presentation_style=fullscreen&utm_source=bbs&'
|
|
||||||
'utm_medium=mys&utm_campaign=icon',
|
|
||||||
'Accept-Encoding': 'gzip, deflate',
|
|
||||||
'Accept-Language': 'zh-CN,en-US;q=0.8',
|
|
||||||
'X-Requested-With': 'com.mihoyo.hyperion',
|
|
||||||
"Cookie": config.config["account"]["cookie"],
|
|
||||||
'x-rpc-device_id': tools.get_device_id()
|
|
||||||
}
|
|
||||||
self.acc_List = get_account_list("bh2_cn", self.headers)
|
self.acc_List = get_account_list("bh2_cn", self.headers)
|
||||||
self.sign_day = 0
|
self.sign_day = 0
|
||||||
|
24
honkai3rd.py
24
honkai3rd.py
@ -10,23 +10,13 @@ from account import get_account_list
|
|||||||
|
|
||||||
class Honkai3rd:
|
class Honkai3rd:
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self.headers = {
|
self.headers = setting.headers
|
||||||
'Accept': 'application/json, text/plain, */*',
|
self.headers['DS'] = tools.get_ds(web=True, web_old=True)
|
||||||
'DS': tools.get_ds(web=True, web_old=True),
|
self.headers['Referer'] = 'https://webstatic.mihoyo.com/bh3/event/euthenia/index.html?bbs_presentation_style' \
|
||||||
'Origin': 'https://webstatic.mihoyo.com',
|
'=fullscreen&bbs_game_role_required=bh3_cn&bbs_auth_required=true&act_id=' \
|
||||||
'x-rpc-app_version': setting.mihoyobbs_Version_old,
|
f'{setting.honkai3rd_Act_id}&utm_source=bbs&utm_medium=mys&utm_campaign=icon'
|
||||||
'User-Agent': 'Mozilla/5.0 (Linux; Android 9; Unspecified Device) AppleWebKit/537.36 (KHTML, like Gecko) '
|
self.headers['Cookie'] = config.config["account"]["cookie"]
|
||||||
'Version/4.0 Chrome/39.0.0.0 Mobile Safari/537.36 miHoYoBBS/2.3.0',
|
self.headers['x-rpc-device_id'] = tools.get_device_id()
|
||||||
'x-rpc-client_type': setting.mihoyobbs_Client_type_web,
|
|
||||||
'Referer': f'https://webstatic.mihoyo.com/bh3/event/euthenia/index.html?bbs_presentation_style=fullscreen'
|
|
||||||
f'&bbs_game_role_required=bh3_cn&bbs_auth_required=t'
|
|
||||||
f'rue&act_id={setting.honkai3rd_Act_id}&utm_source=bbs&utm_medium=mys&utm_campaign=icon',
|
|
||||||
'Accept-Encoding': 'gzip, deflate',
|
|
||||||
'Accept-Language': 'zh-CN,en-US;q=0.8',
|
|
||||||
'X-Requested-With': 'com.mihoyo.hyperion',
|
|
||||||
"Cookie": config.config["account"]["cookie"],
|
|
||||||
'x-rpc-device_id': tools.get_device_id()
|
|
||||||
}
|
|
||||||
self.acc_List = get_account_list("bh3_cn", self.headers)
|
self.acc_List = get_account_list("bh3_cn", self.headers)
|
||||||
self.sign_day = 0
|
self.sign_day = 0
|
||||||
|
|
||||||
|
17
setting.py
17
setting.py
@ -50,6 +50,23 @@ game_id2name = {
|
|||||||
# Config Load之后run里面进行列表的选择
|
# Config Load之后run里面进行列表的选择
|
||||||
mihoyobbs_List_Use = []
|
mihoyobbs_List_Use = []
|
||||||
|
|
||||||
|
# 游戏签到的请求头
|
||||||
|
headers = {
|
||||||
|
'Accept': 'application/json, text/plain, */*',
|
||||||
|
'DS': "",
|
||||||
|
'Origin': 'https://webstatic.mihoyo.com',
|
||||||
|
'x-rpc-app_version': mihoyobbs_Version_old,
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Linux; Android 9; Unspecified Device) AppleWebKit/537.36 (KHTML, like Gecko) '
|
||||||
|
'Version/4.0 Chrome/39.0.0.0 Mobile Safari/537.36 miHoYoBBS/2.3.0',
|
||||||
|
'x-rpc-client_type': mihoyobbs_Client_type_web,
|
||||||
|
'Referer': '',
|
||||||
|
'Accept-Encoding': 'gzip, deflate',
|
||||||
|
'Accept-Language': 'zh-CN,en-US;q=0.8',
|
||||||
|
'X-Requested-With': 'com.mihoyo.hyperion',
|
||||||
|
"Cookie": "",
|
||||||
|
'x-rpc-device_id': ""
|
||||||
|
}
|
||||||
|
|
||||||
# 通用设置
|
# 通用设置
|
||||||
bbs_Api = "https://bbs-api.mihoyo.com"
|
bbs_Api = "https://bbs-api.mihoyo.com"
|
||||||
web_Api = "https://api-takumi.mihoyo.com"
|
web_Api = "https://api-takumi.mihoyo.com"
|
||||||
|
Loading…
Reference in New Issue
Block a user