Skip to content

Commit

Permalink
Merge pull request #218 from Ljzd-PRO/dev
Browse files Browse the repository at this point in the history
更新至 v1.4.1
  • Loading branch information
Ljzd-PRO authored Nov 28, 2023
2 parents cd11b36 + 60ab975 commit b150dc0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
# mysTool - 米游社辅助工具插件

## 📣 更新内容
### 2023.11.26 - v1.4.1
- 更新 adapter-qq 适配器,修复QQ频道私信通知失败的问题 #215
- 更新App版本号以及DS Salt值
- 修复原神便笺获取失败的问题(米游社App内API)#216

### 2023.11.13 - v1.4.0
- 跟进QQ频道适配器的变更,已更换停止维护的 `nonebot-adapter-qqguild` 适配器为 `nonebot-adapter-qq`

Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nonebot-plugin-mystool"
version = "v1.4.0"
version = "v1.4.1"
description = "QQ聊天、频道机器人插件 | 米游社工具-每日米游币任务、游戏签到、商品兑换、免抓包登录、原神崩铁便笺提醒"
license = "MIT"
authors = [
Expand Down Expand Up @@ -29,8 +29,8 @@ nonebot_plugin_apscheduler = ">=0.2.0"
ntplib = "^0.4.0"
Pillow = ">=9.5,<11.0"
requests = "^2.31.0"
nonebot_adapter_onebot = "^2.2.4"
nonebot-adapter-qq = "^1.0.1"
nonebot-adapter-onebot = "^2.3.1"
nonebot-adapter-qq = "^1.1.2"
tenacity = "^8.2.3"
qrcode = "^7.4.2"
pydantic = "^1.10.0"
Expand Down
8 changes: 4 additions & 4 deletions src/nonebot_plugin_mystool/plugin_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from . import user_data
from .user_data import UserData, UserAccount

VERSION = "v1.4.0"
VERSION = "v1.4.1"
"""程序当前版本"""

ROOT_PATH = Path(__name__).parent.absolute()
Expand Down Expand Up @@ -154,9 +154,9 @@ class SaltConfig(BaseSettings):
"""
生成Headers - DS所用salt值,非必要请勿修改
"""
SALT_IOS: str = "F6tsiCZEIcL9Mor64OXVJEKRRQ6BpOZa"
SALT_IOS: str = "9ttJY72HxbjwWRNHJvn0n2AYue47nYsK"
'''LK2 - 生成Headers iOS DS所需的salt'''
SALT_ANDROID: str = "xc1lzZFOBGU0lz8ZkPgcrWZArZzEVMbA"
SALT_ANDROID: str = "BIPaooxbWZW02fGHZL1If26mYCljPgst"
'''K2 - 生成Headers Android DS所需的salt'''
SALT_DATA: str = "t0qEgfub6cvueAPgR5m9aQWWVciEer7v"
'''6X - Android 设备传入content生成 DS 所需的 salt'''
Expand Down Expand Up @@ -211,7 +211,7 @@ class DeviceConfig(BaseSettings):
X_RPC_CHANNEL_ANDROID: str = "miyousheluodi"
'''安卓端 x-rpc-channel'''

X_RPC_APP_VERSION: str = "2.55.1"
X_RPC_APP_VERSION: str = "2.63.1"
'''Headers所用的 x-rpc-app_version'''
X_RPC_PLATFORM: str = "ios"
'''Headers所用的 x-rpc-platform'''
Expand Down
6 changes: 4 additions & 2 deletions src/nonebot_plugin_mystool/simple_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,9 @@
"Referer": "https://webstatic.mihoyo.com/",
"x-rpc-app_version": device_config.X_RPC_APP_VERSION,
"X-Requested-With": "com.mihoyo.hyperion",
"x-rpc-client_type": "5"
"x-rpc-client_type": "5",
"x-rpc-tool_version": "v4.2.2-ys",
"x-rpc-page": "v4.2.2-ys_#/ys/daily"
}

HEADERS_STARRAIL_STATUS_WIDGET = {
Expand Down Expand Up @@ -1508,7 +1510,7 @@ async def genshin_note(account: UserAccount) -> Tuple[
logger.info(
f"原神实时便笺: 用户 {account.bbs_uid} 可能被验证码阻拦")
logger.debug(f"网络请求返回: {res.text}")
if api_result.invalid_ds or api_result.retcode == 1034:
if not api_result.success:
headers["DS"] = generate_ds()
headers["x-rpc-device_id"] = account.device_id_ios
async with httpx.AsyncClient() as client:
Expand Down

0 comments on commit b150dc0

Please sign in to comment.