mirror of
https://github.com/baiqwerdvd/StarRailUID.git
synced 2025-05-05 11:13:45 +08:00
🐛再次修复验证码问题以及抽卡记录绘图重叠bug (#35)
This commit is contained in:
parent
d665eea99b
commit
384bf4e7dc
@ -406,7 +406,7 @@ async def draw_gachalogs_img(uid: str, user_id: str) -> Union[bytes, str]:
|
||||
'mm',
|
||||
)
|
||||
y_extend += (
|
||||
(1 + ((total_data[type_list[index - 1]]['total'] - 1) // 5)) * 165
|
||||
(1 + ((total_data[type_list[index - 1]]['total'] - 1) // 5)) * 150
|
||||
if index != 0
|
||||
else 0
|
||||
)
|
||||
@ -415,7 +415,7 @@ async def draw_gachalogs_img(uid: str, user_id: str) -> Union[bytes, str]:
|
||||
tasks = []
|
||||
for item_index, item in enumerate(total_data[i]['list']):
|
||||
item_x = (item_index % 5) * 138 + 25
|
||||
item_y = (item_index // 5) * 150 + y + 355
|
||||
item_y = (item_index // 5) * 170 + y + 355
|
||||
xy_point = (item_x, item_y)
|
||||
tasks.append(
|
||||
_draw_card(
|
||||
|
@ -36,23 +36,11 @@ RECOGNIZE_SERVER = {
|
||||
|
||||
|
||||
class MysApi(_MysApi):
|
||||
mysVersion = '2.44.1'
|
||||
_HEADER = {
|
||||
'x-rpc-app_version': mysVersion,
|
||||
'User-Agent': (
|
||||
'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) '
|
||||
f'AppleWebKit/605.1.15 (KHTML, like Gecko) miHoYoBBS/{mysVersion}'
|
||||
),
|
||||
'x-rpc-client_type': '5',
|
||||
'x-rpc-device_id': uuid.uuid4().hex,
|
||||
'x-rpc-device_fp': random_hex(16),
|
||||
'x-rpc-page': '3.1.3_#/rpg',
|
||||
'Referer': 'https://webstatic.mihoyo.com/',
|
||||
'Origin': 'https://webstatic.mihoyo.com',
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self._HEADER['x-rpc-device_id'] = uuid.uuid4().hex
|
||||
self._HEADER['x-rpc-device_fp'] = random_hex(14)
|
||||
self._HEADER['x-rpc-page'] = '3.1.3_#/rpg'
|
||||
|
||||
async def create_qrcode_url(self) -> Union[Dict, int]:
|
||||
device_id: str = ''.join(random.choices(ascii_letters + digits, k=64))
|
||||
|
Loading…
x
Reference in New Issue
Block a user