Skip to content

ShatteredGod/hoyolab_checkin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hoyolab Auto Daily Check-in


Overview

A simple program that allows you to always claim Hoyolab's daily login system for Hoyoverse games. Script was originally made by vermaysha/Hoyolab-Auto-Daily-Checkin, but since the original repository is archived I decided to fork and maintain it myself, along with some improvements and installation guide.

Features:

  1. Send notification to Discord channel
  2. Multiple accounts detection
  3. Lightweight

What you need

Hoyolab account cookie (COOKIE)

Navigate to Hoyolab website with your account logged in, open developer tools on your browser (F12 for Firefox/Chrome), navigate to Console tab, enter document.cookie in, and copy the long-string text output without the quotation marks.

image

Browser agent (USER_AGENT)

You can get your user agent by just simply typing it in your search engine (Google/DuckDuckGo)
image

(Optional) Discord Webhook URL (DISCORD_WEBHOOK)

You can have the script notify on a Discord channel via webhook. On any channel where you have webhook permissions in, go into:

Channel Settings > Integrations > Webhooks > New Webhook

You can also choose to use existing one by clicking on Copy Webhook URL

image

(Optional) Whether the script should (RUN_ONCE) or continuously

This should either be left unset, or a value of True or False. Set it to True if you have an external scheduler (like CRON) to automatically start the script at certain time. The script will run as a process when this value is set to False.

Installation

Running the script on Railway

Railway's Starter plan has an execution limit of 500 hours a month, Since Railway has no option to schedule runtime, this script will run constantly. Make sure you're under their Developer plan to lift the hour limit. It's still free if your resource usage is under their $5 free credit limit, which this script will consume at most $0.50 monthly.

  1. Sign Up on Railway if you haven't.
  2. Fork this repo
    image
  3. Make new project on Railway and select this option
    image
  4. Select the new repo you just forked
    image
  5. Click "Add Variables" and fill in your stuff, refer to the suggestions below it. After you're done it should look like this
    image
  6. Wait for the build to finish and check your deployment logs to verify it's working
    image
Running the script on Northflank

In addition to hosting your applications, Northflank also let you schedule jobs to run in CRON format, and their free tier does not have hourly limit unlike Railway. But in a free project, you are limited to 2 jobs at any time.

  1. Sign Up on Northflank if you haven't and create a free project. It should look like this:
    image
  2. Create a new job and select 'Cron job' as job type.
    image
  3. Enter the time at which you the script to run at, in CRON format. Refer crontab.guru for explanation in cron formatting.
    image
  4. Select 'External Image' under 'Job source' and use this URL for 'Image path':
    ghcr.io/raidensakura/hoyolab-auto-login:master
    image
  5. Fill in your credentials under 'Environmental Variables'. Make sure to set RUN_ONCE to True in the env.
    image
  6. Save your script. Now, execute it manually by clicking the 'Run job' button, as shown:
    image
  7. You should see a new entry under 'Recent job runs', as follow:
    image
  8. Click on it, and then click on its entry under 'Containers'. If your script is working correctly, it should show a log as follow:
    Untitled

FAQ

  • Do I have to run this on Railway?
    You can run it on anything that can run Python or Docker (which is pretty much anything). Railway just happen to be the most user friendly PaaS I currently use.

  • If I play multiple Hoyoverse games, does it log into all of them?
    The supported games for now are:

    • Honkai Impact 3rd
    • Genshin Impact
    • Honkai: Star Rail

    If you've binded those game accounts to your Hoyolab account, it will claim the daily login in all of them.

  • How do I log in with multiple Hoyolab accounts?
    Add a # between your cookies.

    Example:
    COOKIE1#COOKIE2#COOKIE3

  • Why aren't you using GitHub Actions?
    There has been multiple repositories getting taken down due to violation of GitHub's Terms of Service. Unfortunately, due to the nature of this script (which counts as account automation), it's better safe than sorry. Again, as a disclaimer, I take no responsibility of the security and safety of your account by using this script.

  • I need specific help
    You are free to join my Discord server and post your question there. I'll reply when I'm free and try to help from what I know.

Contributing

When suggesting changes, please format your code with black and isort.

Install dependencies and activate the pipenv with:

pipenv install
pipenv shell

For formatting:

pipenv install --dev
black . ; isort .

For testing:

pipenv run login

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages