Skip to content

Asynchronous module for working with API Honkai: Star Rail

License

Notifications You must be signed in to change notification settings

DEViantUA/HonkaiStarRail.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asynchronous module for working with API Honkai: Star Rail

At the moment it only supports counting guarantors and getting a jumps

Installation:

pip install honkaistarrail

PyPi: OPEN

You can also see other usage examples here: OPEN

Instructions for getting a link to the history of jumps: OPEN You also can not get the link manually, just open the magazine in the game and do not pass the link parameter, then the code will automatically get it.

ID Banned:

1 - Event Banner 2 - Light Cone 3 - Standart Banner

Launc:

# Copyright 2023 DEViantUa <t.me/deviant_ua>
# All rights reserved.

'''
This method returns the full history of jumps for the 
last 3 months, does not return the results of jumps 
and how much is left before the guarantor.
'''

import asyncio
from honkaistarrail import starrail

async def get_jump_history():
    link = ""
    async with starrail.Jump(link = link,banner = 1,lang = "en") as hist:
        async for key in hist.get_history():
            for info in key:
                print(f'[{info.type}] Name: {info.name} ({info.rank}*) - {info.time.strftime("%d.%m.%Y %H:%M:%S")}')


asyncio.run(get_jump_history())

In developing:

  1. Automatic code redemption.
  2. Automatic collection of daily marks on HoYoLab.