Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为部分功能添加国际服支持 #366

Merged
merged 1 commit into from
Nov 1, 2022
Merged

为部分功能添加国际服支持 #366

merged 1 commit into from
Nov 1, 2022

Conversation

twfx1207
Copy link
Contributor

@twfx1207 twfx1207 commented Nov 1, 2022

已测试通过功能:

  • uid查询
  • 深渊
  • 收集
  • 每日便签(图片/文字)
  • 每月统计(图片/文字)

未支持功能:

  • 米游社相关所有功能(未找到hoyolab相关功能)
  • stoken相关所有功能(同上)
  • 签到

待测试功能:

  • 自动任务
  • 推送通知

Signed-off-by: Chino Kafuu <twfx1207@gmail.com>
@KimigaiiWuyi
Copy link
Owner

KimigaiiWuyi commented Nov 1, 2022

大佬牛逼
不过应该新开一个表去存放国际服CK,要不然会随机到国际服CK去查询国服
或者重写随机获取CK逻辑,判断NewCookiesTable这个表的UID列的首位
又或者在NewCookiesTable这个表新增一列

@KimigaiiWuyi
Copy link
Owner

获取随机CK逻辑在这

sql = select(NewCookiesTable).order_by(func.random())

@twfx1207
Copy link
Contributor Author

twfx1207 commented Nov 1, 2022

不过应该新开一个表去存放国际服CK,要不然会随机到国际服CK去查询国服

是的,目前两边的cookie没有隔离处理,为了优先保证国服功能,国际服没有存公共ck,所有的查询都需要用户绑定ck以后才能生效。
ck判断有时间再写吧(下次一定

@KimigaiiWuyi
Copy link
Owner

不过应该新开一个表去存放国际服CK,要不然会随机到国际服CK去查询国服

是的,目前两边的cookie没有隔离处理,为了优先保证国服功能,国际服没有存公共ck,所有的查询都需要用户绑定ck以后才能生效。 ck判断有时间再写吧(下次一定

晚上我检查一下然后再合入,国际服CK判断我过几天写
再次感谢大佬!

@twfx1207
Copy link
Contributor Author

twfx1207 commented Nov 1, 2022

我重新检查了一下cookie逻辑,如果用户自己绑定了cookie也会被分配到数据库中的随机cookie吗

@KimigaiiWuyi
Copy link
Owner

我重新检查了一下cookie逻辑,如果用户自己绑定了cookie也会被分配到数据库中的随机cookie吗

绑定自己CK的用户,每次调用只会返回自己的CK;
所有绑定的CK都会进入公共池给未绑定CK的用户随机抽取,并进入缓存;

@KimigaiiWuyi KimigaiiWuyi merged commit 233d6c9 into KimigaiiWuyi:main Nov 1, 2022
KimigaiiWuyi pushed a commit that referenced this pull request Nov 1, 2022
Signed-off-by: Chino Kafuu <twfx1207@gmail.com>
KimigaiiWuyi pushed a commit that referenced this pull request Nov 1, 2022
Signed-off-by: Chino Kafuu <twfx1207@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants