Code Monkey home page Code Monkey logo

autologin-hoyolab's Introduction

Image of Collei reading

Collei

Collei claims daily check-in rewards and new codes for you.

Table of contents

Setup

First you'll have to make a decision, whether you want to fork Collei or generate your own version from the template.

Forking the repository has the benefit of being able to apply fixed and updates to your version easily, with the downside of having to have the repository publicly visible in your GitHub profile due to GitHub limitations.

If you wish to keep the repository private, you'll have to generate it from the template, with the downside of having to apply patches manually.

Option a: Fork the repository

Option b: Generate from template

Copy your cookies

Log in at hoyolab.com, open the developer console by pressing F12 on your keyboard and navigate to the console tab. Finally, paste the following in the console to copy your cookies to your clipboard copy(document.cookie).

IMPORTANT: Never share your cookies with anyone!

Create a repository secret

Paste your cookies in the repository secret

Create a new secret called GENSHIN_COOKIES or STARRAIL_COOKIES respectively and paste your cookies. If both your Star Rail and Genshin accounts are connected to the same Hoyoverse account, paste the same cookie in each.
If you don't have an account for one of the games, skip setting the cookie secret. Collei will only try to claim the rewards for games you provide her with and may fail otherwise.

Give the action write permissions

Run the action manually

And you're set! From now on Collei will claim any new codes and redeem the daily check-in rewards at Hoyolab for you every 6 hours!

Running locally

You can also run this repository locally if you do not wish to rely on GitHub.
$ git clone https://github.com/c4em/collei
$ cd collei
$ pip install -r requirements.txt
$ GENSHIN_COOKIES="your cookies" STARRAIL_COOKIES="your cookies" ./collei

If you wish to automate this process, read up on cron jobs for your distribution.

Troubleshooting

Help! My Collei broke!
This section goes over some common reasons why Collei might break.

Changed Password

If you reset your password, you'll have to set your cookies again because they'll be reset. Simply delete the existing secrets in the repository and follow the step to set your cookies again.

Setting cookies for a game account you don't have

Collei will fail if you provide her with cookies to a game you don't play. Simply remove the cookie for the given game and she'll resume work like usual.

Something else

It could be that the script broke due to an oopsie on my side, in which case I'm sorry. Have a look at the original repository to see if there have been any changes.

If there are, the easiest way to fix the issue, if you're not a developer, would be to set up collei again from scratch.
Why? You might ask. I know it sucks but GitHub doesn't allow you to create private forks, so you would have to have it publicly visible on your profile, which would turn away most people. So instead the repository is a public template, which you can set to be private after copying it. If you do not care that you have to keep the repository public, you can use the fork option in the top right instead.

If there are not, you can contact me about the issue by opening an issue in the GitHub repository or sending me a message directly somewhere. I'll be glad to help. My contact information is visible on my GitHub profile.

Repository license

This project is licensed under GPLv3.

autologin-hoyolab's People

Contributors

riteshp2001 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.