This repository has been archived by the owner on Jun 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
20 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
import genshinstats as gs | ||
gs.set_cookie(ltuid=7368957, ltoken="X5VJAbNxdKpMp96s7VGpyIBhSnEJr556d5fFMcT5") | ||
|
||
uid = 901211014 | ||
notes = gs.get_notes(uid) | ||
time = (notes['max_resin']-notes['resin'])*8/60 | ||
hours = int(time) | ||
minutes = (time*60) % 60. | ||
print(f"User UID: {uid}") | ||
print(f"Current resin: {notes['resin']}/{notes['max_resin']}") | ||
print(f"Resin full in %d hours %02d minutes" % (hours, minutes)) | ||
print(f"Current realm currency: {notes['realm_currency']}/{notes['max_realm_currency']}") | ||
print(f"Expeditions completed: {len(notes['expeditions'])}/{notes['max_expeditions']}") | ||
import asyncio | ||
import genshin | ||
|
||
async def main(): | ||
client = genshin.GenshinClient() | ||
cookies = genshin.get_browser_cookies() | ||
client.set_cookies(cookies) | ||
|
||
notes = await client.get_notes(901211014) | ||
time = notes.until_resin_recovery | ||
hours, minutes = divmod(time // 60, 60) | ||
print(f"Current resin: {notes.current_resin}/{notes.max_resin}") | ||
print(f"Resin full in {hours:.0f} hours {minutes:.0f} minutes") | ||
print(f"Comissions left: {notes.completed_commissions}/{notes.max_comissions}") | ||
print(f"Current realm currency: {notes.current_realm_currency}/{notes.max_realm_currency}") | ||
print(f"Expeditions finished: {sum(expedition.finished for expedition in notes.expeditions)}") | ||
|
||
await client.close() | ||
|
||
asyncio.run(main()) |