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

Cannot get CharacterRanks data from client.get_spiral_abyss() if I don't browse the Hoyolab app first #42

Open
KT-Yeh opened this issue Jun 16, 2022 · 6 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@KT-Yeh
Copy link
Collaborator

KT-Yeh commented Jun 16, 2022

How to reproduce:

  1. Finish any floor of abyss
  2. Wait and don't open Hoyolab app or website
  3. Use client.get_spiral_abyss() function
  4. The CharacterRanks is empty. Everything else works.
  5. After you browse Hoyolab app or website, the CharacterRanks will show normally when using client.get_spiral_abyss()

Example

    data = await client.get_spiral_abyss(826263929)
    print(data)
SpiralAbyss(unlocked=False, season=48, 
    start_time=datetime.datetime(2022, 6, 15, 20, 0, tzinfo=datetime.timezone.utc), 
    end_time=datetime.datetime(2022, 6, 30, 19, 59, 59, tzinfo=datetime.timezone.utc), 
    total_battles=6, total_wins='6', max_floor='10-3', total_stars=18, 
    ranks=CharacterRanks(most_played=[], most_kills=[], strongest_strike=[], most_damage_taken=[], most_bursts_used=[], most_skills_used=[]), 
    floors=[Floor(floor=9, unlocked=True, stars=9, max_stars=9, chambers=[
    Chamber(chamber=1, stars=3, max_stars=3, battles=[Battle(half=1, timestamp=datetime.date(2022, 6, 16), characters=[AbyssCharacter(id=10000046, name='Hu Tao', element='Pyro', rarity=5, 
    .....
@thesadru
Copy link
Owner

Do they show up immediately after doing the floor and checking the hoyolab app? There used to be a 1-hour delay.

@KT-Yeh
Copy link
Collaborator Author

KT-Yeh commented Jun 16, 2022

yeah, CharacterRanks show up immediately after I open the hoyolab website.

the time between my bot commands is about 1 minute

@thesadru
Copy link
Owner

This sounds very annoying to debug but I'll see what I can do.

@KT-Yeh
Copy link
Collaborator Author

KT-Yeh commented Jun 17, 2022

I found the requests are after getGameRecordCard.

I use another UID and the CharacterRanks is empty.

    await client.get_record_cards()
    data = await client.get_spiral_abyss(client.uid)
    print(data.ranks)

After client.get_record_cards(), the result can show CharacterRanks correctly now.

@thesadru
Copy link
Owner

Guess this should be documented. I don't want to force users to make an extra request arbitrarily.

@thesadru thesadru added bug Something isn't working documentation Improvements or additions to documentation labels Jun 24, 2022
@thesadru thesadru pinned this issue Jun 25, 2023
@KT-Yeh KT-Yeh unpinned this issue Sep 10, 2023
@seriaati
Copy link
Collaborator

Does this issue still persist?

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

No branches or pull requests

3 participants