hoyo-daily-logins-helper


Namehoyo-daily-logins-helper JSON
Version 2.8.2 PyPI version JSON
download
home_pagehttps://gitlab.com/atomicptr/hoyo-daily-logins-helper
SummaryGet hoyo daily login rewards automatically!
upload_time2023-08-20 07:45:02
maintainer
docs_urlNone
authorChristopher Kaster
requires_python>=3.11,<4.0
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 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)
* 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": "",
    "docs_url": null,
    "requires_python": ">=3.11,<4.0",
    "maintainer_email": "",
    "keywords": "genshin,genshin-impact,starrail,honkai-starrail,game",
    "author": "Christopher Kaster",
    "author_email": "me@atomicptr.de",
    "download_url": "https://files.pythonhosted.org/packages/b5/17/9b1f720ffe0d481c199ef2017792de3a16730d5654d35cc18c7d9e642bef/hoyo_daily_logins_helper-2.8.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 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* 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.8.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": "955f4d945a408b9b82e56b370a387d2a55d0b0fa49fae3fa8eb34336b8976730",
                "md5": "27032dff96c283475fef8f6b7721bb46",
                "sha256": "e3c685e6a2eea800850d3ce160365be280f8b529ee0772e098741b436a14ebb6"
            },
            "downloads": -1,
            "filename": "hoyo_daily_logins_helper-2.8.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "27032dff96c283475fef8f6b7721bb46",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11,<4.0",
            "size": 24949,
            "upload_time": "2023-08-20T07:45:00",
            "upload_time_iso_8601": "2023-08-20T07:45:00.227920Z",
            "url": "https://files.pythonhosted.org/packages/95/5f/4d945a408b9b82e56b370a387d2a55d0b0fa49fae3fa8eb34336b8976730/hoyo_daily_logins_helper-2.8.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b5179b1f720ffe0d481c199ef2017792de3a16730d5654d35cc18c7d9e642bef",
                "md5": "f58bb5073fb7bb78bef434c482196625",
                "sha256": "d8c92e91ece4f6b83184b75ff6c472cf0ad018e0e9793106789dfa092bbf3103"
            },
            "downloads": -1,
            "filename": "hoyo_daily_logins_helper-2.8.2.tar.gz",
            "has_sig": false,
            "md5_digest": "f58bb5073fb7bb78bef434c482196625",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11,<4.0",
            "size": 23773,
            "upload_time": "2023-08-20T07:45:02",
            "upload_time_iso_8601": "2023-08-20T07:45:02.808568Z",
            "url": "https://files.pythonhosted.org/packages/b5/17/9b1f720ffe0d481c199ef2017792de3a16730d5654d35cc18c7d9e642bef/hoyo_daily_logins_helper-2.8.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-20 07:45:02",
    "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.10163s