hoyo-daily-logins-helper


Namehoyo-daily-logins-helper JSON
Version 2.9.2 PyPI version JSON
download
home_pagehttps://gitlab.com/atomicptr/hoyo-daily-logins-helper
SummaryGet hoyo daily login rewards automatically!
upload_time2024-10-12 16:04:03
maintainerNone
docs_urlNone
authorChristopher Kaster
requires_python<4.0,>=3.12
licenseGPL-3.0-or-later
keywords genshin genshin-impact starrail honkai-starrail game
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # hoyo-daily-login-helper

Get hoyo daily login rewards automatically!

![](https://i.imgur.com/LiWb3EG.png)

## Usage

1. Get your cookie string, open the daily check in page
   * [Daily Check-in page for Genshin Impact](https://act.hoyolab.com/ys/event/signin-sea-v3/index.html?act_id=e202102251931481)
   * [Daily Check-in page for Honkai: Star Rail](https://act.hoyolab.com/bbs/event/signin/hkrpg/index.html?act_id=e202303301540311)
   * [Daily Check-in page for Honkai Impact 3rd](https://act.hoyolab.com/bbs/event/signin-bh3/index.html?act_id=e202110291205111)
   * [Daily Check-in page for Zenless Zone Zero](https://act.hoyolab.com/bbs/event/signin/zzz/index.html?act_id=e202406031448091)
   * [Daily Check-in page for Tears of Themis](https://act.hoyolab.com/bbs/event/signin/nxx/index.html?act_id=e202202281857121)
2. Open a development console (F12) and insert the following code:
    ```javascript
    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:
    ```bash
    $ 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!

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

### pip

```bash
$ pipx install hoyo-daily-logins-helper
```

**Note**: While regular pip should work, it's highly recommended installing this
tool via [pipx](https://pypa.github.io/pipx/) instead!

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


## Configuration

### Cookie

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!

```bash
$ 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

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

### Multiple accounts

You can run this tool for multiple accounts at once:

```bash
$ 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 ","

```bash
$ 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.

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

Content:

```toml
# 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.

```toml
[config]
# ...
enable_scheduler = true

[[accounts]]
# ....
```

### Discord notifications

If you want to ping a Discord channel, [create a webhook](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) and add it to the configuration:

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

[[accounts]]
# ....
```

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

```toml
[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.

```toml
[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.

```toml
[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

![](https://www.gnu.org/graphics/gplv3-127x51.png)

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/atomicptr/hoyo-daily-logins-helper",
    "name": "hoyo-daily-logins-helper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.12",
    "maintainer_email": null,
    "keywords": "genshin, genshin-impact, starrail, honkai-starrail, game",
    "author": "Christopher Kaster",
    "author_email": "me@atomicptr.de",
    "download_url": "https://files.pythonhosted.org/packages/10/da/f7554c8a8024627ae355bf29423c9a4f619ed98e280026c6773fec8706b0/hoyo_daily_logins_helper-2.9.2.tar.gz",
    "platform": null,
    "description": "# hoyo-daily-login-helper\n\nGet hoyo daily login rewards automatically!\n\n![](https://i.imgur.com/LiWb3EG.png)\n\n## Usage\n\n1. Get your cookie string, open the daily check in page\n   * [Daily Check-in page for Genshin Impact](https://act.hoyolab.com/ys/event/signin-sea-v3/index.html?act_id=e202102251931481)\n   * [Daily Check-in page for Honkai: Star Rail](https://act.hoyolab.com/bbs/event/signin/hkrpg/index.html?act_id=e202303301540311)\n   * [Daily Check-in page for Honkai Impact 3rd](https://act.hoyolab.com/bbs/event/signin-bh3/index.html?act_id=e202110291205111)\n   * [Daily Check-in page for Zenless Zone Zero](https://act.hoyolab.com/bbs/event/signin/zzz/index.html?act_id=e202406031448091)\n   * [Daily Check-in page for Tears of Themis](https://act.hoyolab.com/bbs/event/signin/nxx/index.html?act_id=e202202281857121)\n2. Open a development console (F12) and insert the following code:\n    ```javascript\n    document.cookie\n    ```\n3. Copy the returned string should be something like \"ltoken=....; account_id=....;\" this is your cookie string\n4. Open a terminal with the command prepared and enter:\n    ```bash\n    $ hoyo-daily-logins-helper --cookie=\"your cookie string\" --genshin\n    ```\n   (or ``--starrail`` for Honkai Star Rail)\n5. Done!\n\n## Installation\n\n### Docker\n\nThe command line options are also available via environment variables which\nallows you to easily run this script in Docker/Podman!\n\n```bash\n$ docker run --rm --env HOYO_GAME=starrail --env HOYO_COOKIE=\"your cookie string\" quay.io/atomicptr/hoyo-daily-logins-helper\n```\n\n### pip\n\n```bash\n$ pipx install hoyo-daily-logins-helper\n```\n\n**Note**: While regular pip should work, it's highly recommended installing this\ntool via [pipx](https://pypa.github.io/pipx/) instead!\n\nPyPi: https://pypi.org/project/hoyo-daily-logins-helper/\n\n\n## Configuration\n\n### Cookie\n\nYou can provide the cookie information either via the **HOYO_COOKIE** environment variable or using the --cookie CLI flag.\n\n### Game\n\nYou can provide the cookie information either via the **HOYO_GAME** environment variable or using the --game NAME/--genshin/--starrail CLI flags.\n\n**Supported Games**:\n* Genshin Impact (genshin)\n* Honkai: Star Rail (starrail)\n* Honkai Impact 3rd (honkai)\n* Zenless Zone Zero (zzz)\n* Tears of Themis (themis)\n\n### Debug mode\n\nIf 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!\n\n```bash\n$ HOYO_DEBUG=1 hoyo-daily-logins-helper --starrail --cookie=\"...\"\n```\n\n### Language\n\nIf 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\n\n```bash\n$ HOYO_LANGUAGE=ja-jp hoyo-daily-logins-helper --genshin --cookie=\"...\"\n```\n\n### Multiple accounts\n\nYou can run this tool for multiple accounts at once:\n\n```bash\n$ hoyo-daily-logins-helper --game genshin --cookie \"cookie for acc 1\" --game starrail --cookie \"cookie for acc 2\"\n```\n\nIf you want to do this with environment variables it works basically the same, you just have to separate the values by a \",\"\n\n```bash\n$ HOYO_GAME=genshin,starrail HOYO_COOKIE=\"cookie 1 data...,cookie 2 data...\" hoyo-daily-logins-helper\n```\n\nAlthough I'd recommend you to use a configuration file for this (see the next point)\n\n### Configuration file\n\nIf 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.\n\n```bash\n$ hoyo-daily-logins-helper --config-file ~/path/to/custom-config-file.toml\n```\n\nContent:\n\n```toml\n# you can configurate some things here like the language or the user agent\n# keep in mind that config and every key in there is optional and you can omit it\n[config]\n# i'd recommend against changing this value unless you know what you are doing\n# not setting this will make it look to the developer like we are using a normal\n# web browser while this is very suspicious\nuser_agent = \"My fancy user agent\"\n# the language of the rewards and presumably return messages from the API\nlanguage = \"en-us\"\n\n# every account starts with this index/key \n[[accounts]]\n# accounts can have identifiers for you to differentiate them in the logs\n# you could for instance add your account name or UID here\nidentifier = \"My Genshin Account Name\"\n# the game identifier which has to be genshin or starrail\ngame = \"genshin\"\n# and the cookie value\ncookie = \"My Genshin Cookie...\"\n\n# repeat this for every other account you might have\n[[accounts]]\nidentifier = \"My Starrail Account #1\"\ngame = \"starrail\"\ncookie = \"My Starrail Cookie...\"\n\n[[accounts]]\nidentifier = \"My Starrail Account #2\"\ngame = \"starrail\"\ncookie = \"My Starrail Cookie...\"\n```\n\n## Scheduler mode\n\nScheduler mode **can only be used if you are working with a configuration file**. To\nenable the scheduler mode, set ``enable_scheduler = true`` in the `config` section.\n\n```toml\n[config]\n# ...\nenable_scheduler = true\n\n[[accounts]]\n# ....\n```\n\n### Discord notifications\n\nIf you want to ping a Discord channel, [create a webhook](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) and add it to the configuration:\n\n```toml\n[config]\n# ...\nnotifications = [\n    {type = \"discord\", webhook_url = \"https://....\"}\n]\n\n[[accounts]]\n# ....\n```\n\nYou can globally disable failure or success reports by adding the ```on``` property to the webhook\n\n```toml\n[config]\n# ...\nnotifications = [\n    {type = \"discord\", webhook_url = \"https://....\", on = [\"failure\"]}\n]\n\n[[accounts]]\n# ....\n```\n\nYou can also set accounts to only report on failure if you set the ```report_on``` property.\n\n```toml\n[conifg]\n# ...\n\n[[accounts]]\ngame = \"genshin\"\nreport_on = [\"failure\"]\n```\n\n### Adjusting schedule times\n\nThe daily logins reset is globally the same at 00:00 Asia/Shanghai, but for various\nreasons you might want to delay this, so we added an option for this in the accounts section.\n\n```toml\n[config]\n# ...\n\n[[accounts]]\ngame = \"genshin\"\n# example for configuring everything\ncheckin_time = {hour = 17, minute = 0, timezone = \"Europe/Berlin\"}\n\n[[accounts]]\ngame = \"starrail\"\n# example for only configurating this partially, in this case we want to have the script run at 00:42\ncheckin_time = {minute = 42}\n```\n\n## License\n\nGNU General Public License v3\n\n![](https://www.gnu.org/graphics/gplv3-127x51.png)\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "Get hoyo daily login rewards automatically!",
    "version": "2.9.2",
    "project_urls": {
        "Homepage": "https://gitlab.com/atomicptr/hoyo-daily-logins-helper",
        "Repository": "https://gitlab.com/atomicptr/hoyo-daily-logins-helper"
    },
    "split_keywords": [
        "genshin",
        " genshin-impact",
        " starrail",
        " honkai-starrail",
        " game"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ea27553c3686efa74b734a1b28c2066f614f19d6e5624cedc697925e7e73dfbd",
                "md5": "ee01b95bb15fa9a15582197a03f2608b",
                "sha256": "fe149a71f59f363cfd44180228eac0fd74a3b570077600755353e7b4422aa1cc"
            },
            "downloads": -1,
            "filename": "hoyo_daily_logins_helper-2.9.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ee01b95bb15fa9a15582197a03f2608b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.12",
            "size": 25109,
            "upload_time": "2024-10-12T16:04:01",
            "upload_time_iso_8601": "2024-10-12T16:04:01.312274Z",
            "url": "https://files.pythonhosted.org/packages/ea/27/553c3686efa74b734a1b28c2066f614f19d6e5624cedc697925e7e73dfbd/hoyo_daily_logins_helper-2.9.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "10daf7554c8a8024627ae355bf29423c9a4f619ed98e280026c6773fec8706b0",
                "md5": "b5b8f94a4e6d4820a625bd22917c075e",
                "sha256": "ef5d58a4e10ecf9670fc9b89119540b18c80452c5628d80e7ea6784ceb22cc73"
            },
            "downloads": -1,
            "filename": "hoyo_daily_logins_helper-2.9.2.tar.gz",
            "has_sig": false,
            "md5_digest": "b5b8f94a4e6d4820a625bd22917c075e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.12",
            "size": 23949,
            "upload_time": "2024-10-12T16:04:03",
            "upload_time_iso_8601": "2024-10-12T16:04:03.054319Z",
            "url": "https://files.pythonhosted.org/packages/10/da/f7554c8a8024627ae355bf29423c9a4f619ed98e280026c6773fec8706b0/hoyo_daily_logins_helper-2.9.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-12 16:04:03",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "atomicptr",
    "gitlab_project": "hoyo-daily-logins-helper",
    "lcname": "hoyo-daily-logins-helper"
}
        
Elapsed time: 0.29825s