Skip to main content

hoyo-daily-login-helper

Get hoyo daily login rewards automatically!

Usage

  1. Get your cookie string, open the daily check in page
  2. Open a development console (F12) and insert the following code:
    document.cookie
    
  3. Copy the returned string should be something like "ltoken=....; account_id=....;" this is your cookie string
  4. Open a terminal with the command prepared and enter:
    $ hoyo-daily-logins-helper --cookie="your cookie string" --genshin
    
    (or --starrail for Honkai Star Rail)
  5. Done!

Installation

Docker

The command line options are also available via environment variables which allows you to easily run this script in Docker/Podman!

$ docker run --rm --env HOYO_GAME=starrail --env HOYO_COOKIE="your cookie string" quay.io/atomicptr/hoyo-daily-logins-helper

pip

$ pipx install hoyo-daily-logins-helper

Note: While regular pip should work, it's highly recommended installing this tool via pipx instead!

PyPi: https://pypi.org/project/hoyo-daily-logins-helper/

Configuration

You can provide the cookie information either via the HOYO_COOKIE environment variable or using the --cookie CLI flag.

Game

You can provide the cookie information either via the HOYO_GAME environment variable or using the --game NAME/--genshin/--starrail CLI flags.

Supported Games:

  • Genshin Impact (genshin)
  • Honkai: Star Rail (starrail)
  • Honkai Impact 3rd (honkai)
  • Zenless Zone Zero (zzz)
  • Tears of Themis (themis)

Debug mode

If something doesn't work properly and/or you want to report an issue try running the tool with the HOYO_DEBUG environment variable set to 1! Or provide the --debug flag!

$ HOYO_DEBUG=1 hoyo-daily-logins-helper --starrail --cookie="..."

Language

If you want to see the results in other languages than English you can change it via the HOYO_LANGUAGE environment variable or the --language CLI flag

$ HOYO_LANGUAGE=ja-jp hoyo-daily-logins-helper --genshin --cookie="..."

Multiple accounts

You can run this tool for multiple accounts at once:

$ hoyo-daily-logins-helper --game genshin --cookie "cookie for acc 1" --game starrail --cookie "cookie for acc 2"

If you want to do this with environment variables it works basically the same, you just have to separate the values by a ","

$ HOYO_GAME=genshin,starrail HOYO_COOKIE="cookie 1 data...,cookie 2 data..." hoyo-daily-logins-helper

Although I'd recommend you to use a configuration file for this (see the next point)

Configuration file

If there is a file called "hoyo-daily-logins-helper.toml" in the current working directory (or you provided one via --config-file) the tool will read data from there.

$ hoyo-daily-logins-helper --config-file ~/path/to/custom-config-file.toml

Content:

# you can configurate some things here like the language or the user agent
# keep in mind that config and every key in there is optional and you can omit it
[config]
# i'd recommend against changing this value unless you know what you are doing
# not setting this will make it look to the developer like we are using a normal
# web browser while this is very suspicious
user_agent = "My fancy user agent"
# the language of the rewards and presumably return messages from the API
language = "en-us"

# every account starts with this index/key 
[[accounts]]
# accounts can have identifiers for you to differentiate them in the logs
# you could for instance add your account name or UID here
identifier = "My Genshin Account Name"
# the game identifier which has to be genshin or starrail
game = "genshin"
# and the cookie value
cookie = "My Genshin Cookie..."

# repeat this for every other account you might have
[[accounts]]
identifier = "My Starrail Account #1"
game = "starrail"
cookie = "My Starrail Cookie..."

[[accounts]]
identifier = "My Starrail Account #2"
game = "starrail"
cookie = "My Starrail Cookie..."

Scheduler mode

Scheduler mode can only be used if you are working with a configuration file. To enable the scheduler mode, set enable_scheduler = true in the config section.

[config]
# ...
enable_scheduler = true

[[accounts]]
# ....

Discord notifications

If you want to ping a Discord channel, create a webhook and add it to the configuration:

[config]
# ...
notifications = [
    {type = "discord", webhook_url = "https://...."}
]

[[accounts]]
# ....

You can globally disable failure or success reports by adding the on property to the webhook

[config]
# ...
notifications = [
    {type = "discord", webhook_url = "https://....", on = ["failure"]}
]

[[accounts]]
# ....

You can also set accounts to only report on failure if you set the report_on property.

[conifg]
# ...

[[accounts]]
game = "genshin"
report_on = ["failure"]

Adjusting schedule times

The daily logins reset is globally the same at 00:00 Asia/Shanghai, but for various reasons you might want to delay this, so we added an option for this in the accounts section.

[config]
# ...

[[accounts]]
game = "genshin"
# example for configuring everything
checkin_time = {hour = 17, minute = 0, timezone = "Europe/Berlin"}

[[accounts]]
game = "starrail"
# example for only configurating this partially, in this case we want to have the script run at 00:42
checkin_time = {minute = 42}

License

GNU General Public License v3

Metadata

Release files for hoyo-daily-logins-helper 2.9.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hoyo-daily-logins-helper 2.9.2
File Size Uploaded Provenance Actions
hoyo_daily_logins_helper-2.9.2.tar.gz 23.9 kB Without provenance Details for hoyo_daily_logins_helper-2.9.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hoyo-daily-logins-helper 2.9.2
File Interpreter ABI Platform Actions
hoyo_daily_logins_helper-2.9.2-py3-none-any.whl Python 3 none any Details for hoyo_daily_logins_helper-2.9.2-py3-none-any.whl

Total release size: 49.1 kB

Release files / hoyo_daily_logins_helper-2.9.2.tar.gz

Download URL hoyo_daily_logins_helper-2.9.2.tar.gz
Size 23.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ef5d58a4e10ecf9670fc9b89119540b18c80452c5628d80e7ea6784ceb22cc73
BLAKE2b-256 checksum
How to use checksums
10daf7554c8a8024627ae355bf29423c9a4f619ed98e280026c6773fec8706b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / hoyo_daily_logins_helper-2.9.2-py3-none-any.whl

Download URL hoyo_daily_logins_helper-2.9.2-py3-none-any.whl
Size 25.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe149a71f59f363cfd44180228eac0fd74a3b570077600755353e7b4422aa1cc
BLAKE2b-256 checksum
How to use checksums
ea27553c3686efa74b734a1b28c2066f614f19d6e5624cedc697925e7e73dfbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Security for hoyo-daily-logins-helper 2.9.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.9.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page