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

Error occured during claim daily reward on Chinese Server #35

Open
twfx1207 opened this issue Oct 15, 2021 · 2 comments
Open

Error occured during claim daily reward on Chinese Server #35

twfx1207 opened this issue Oct 15, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@twfx1207
Copy link

Hello,

I made an auto_signin bot based on genshinstats, here are related source codes:

import genshinstats as gs

config = util.get_config()
cookies = config.setting.cookies
cookies_os = config.setting.cookies_os

    for cookie_os in cookies_os:
        cookie = SimpleCookie(cookie_os)
        cookie_dict = {i.key:i.value for i in cookie.values()}
        gs.claim_daily_reward(lang='zh-cn', cookie=cookie_dict)
    
    for cookie_cn in cookies:
        cookie = SimpleCookie(cookie_cn)
        cookie_dict = {i.key:i.value for i in cookie.values()}
        gs.claim_daily_reward(lang='zh-cn', chinese=True, cookie=cookie_dict)

For Asia server it works well, but an NotLoggedIn error raised when ltuid and ltoken is used, while a [-1005 Error (uid不为空)] error occurred on account_id and cookie_token pair for Chinese server.
I wonder if there are any extra parameter or token required.

Regards.

@thesadru
Copy link
Owner

thesadru commented Oct 15, 2021

Yes it is possible that Chinese accounts still require a uid, overseas claiming has removed the need for those a few weeks ago but it seems Chinese has not.

I feel the Chinese version of the API has been greatly diverging from the overseas recently so some overhauls may be necessary. I will most likely add an optional UID parameter for this but it's pretty hard to test Chinese endpoints without a Chinese account so I plan on figuring out how to even create one while not living in china. In the meantime it'll have to be guesswork.

@thesadru thesadru added the bug Something isn't working label Oct 15, 2021
@thesadru thesadru pinned this issue Oct 24, 2021
@thesadru thesadru unpinned this issue Oct 24, 2021
@twfx1207
Copy link
Author

Hello,

I found a plugin which could claim daily reward on Chinese server correctly, possibly would help you:

https://github.com/KimigaiiWuyi/GenshinUID/blob/9a5fdd66903fb3c273491c0590b44e3a581b3591/getDB.py#L362

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants