thesadru / genshin.py

Modern API wrapper for Genshin Impact & Honkai Impact 3rd built on asyncio and pydantic. 原神 崩坏3
https://thesadru.github.io/genshin.py
MIT License
386 stars 72 forks source link

Add daily rewards for ZZZ #201

Closed TheraNinjaCat closed 16 hours ago

TheraNinjaCat commented 3 weeks ago

A cursory look at the network tab during ZZZ daily reward claim suggests that there's nothing significantly different from the Genshin or StarRail ones.

seriaati commented 3 weeks ago

See https://github.com/thesadru/genshin.py/pull/200

seriaati commented 2 weeks ago

You can try it out now by installing the dev branch version of genshin.py

TheraNinjaCat commented 2 weeks ago

Are you absolutely sure you've checked out the dev branch and are actually running that version of the library? I just tested the dev branch with a simple

import genshin
client = genshin.Client()
client.set_cookies(...)
await client.claim_daily_reward(game=genshin.Game.ZZZ)

and it worked perfectly fine when I had checked out and run pip install . on the dev branch. I ran the same code after checking out and running pip install . on the master branch however and I got the exact error you've experienced (RuntimeError: URL does not support ZZZ game for OVERSEAS region.). My account is in the Asia region for what it's worth.

I can't speak to the code redeem, I'm not familiar in the slightest with that code.

rennerdo30 commented 2 weeks ago

Are you absolutely sure you've checked out the dev branch and are actually running that version of the library? I just tested the dev branch with a simple

import genshin
client = genshin.Client()
client.set_cookies(...)
await client.claim_daily_reward(game=genshin.Game.ZZZ)

and it worked perfectly fine when I had checked out and run pip install . on the dev branch. I ran the same code after checking out and running pip install . on the master branch however and I got the exact error you've experienced (RuntimeError: URL does not support ZZZ game for OVERSEAS region.). My account is in the Asia region for what it's worth.

I can't speak to the code redeem, I'm not familiar in the slightest with that code.

Thanks for taking your time to answer. I've already deleted my comment, since I realized, that pip did not update the package, since it was already installed. This was an error on my side, hence I already deleted my comment.

using this command resolved the issue for me:

pip install  --upgrade --force-reinstall git+https://github.com/thesadru/genshin.py@dev
seriaati commented 16 hours ago

Dev changes are now merged into master, you can use the master branch instead.