Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to specify cookie string or cookie file in cookies directory #534

Open
SethFalco opened this issue Jul 2, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@SethFalco
Copy link

SethFalco commented Jul 2, 2022

Is your feature request related to a problem? Please describe.
For the initial authentication, I'd like to be able to just provide the cookies right away, not deal with the interactive login or 2FA in the CLI.

Especially with the docker-compose setup, it's a bit bothersome.

Describe the solution you'd like
I'd like if users could either:

  • Perform document.cookie on Twitch and paste that string either in a file, run.py, or as an environment variable which can be set in the docker-compose.yml file.
  • To use an extension like cookies.txt to export the cookies to a text file, and put that in the cookies/ directory for the miner to use. (Netscape HTTP cookie file)

A cookie string via document.cookie is easy enough to parse manually.

Netscape HTTP cookie files can be parsed by http.cookiejar.

Even better if both could be supported, as non-technical users will probably have an easier time with the extension. (youtube-dl recommends it iirc)
Meanwhile, for technical users, just doing document.cookie is a lot faster than any other means of getting cookies or setting the miner up.

This way the miner can work with no interaction on the first run, making it a much more pleasant experience to set up.

Describe alternatives you've considered
N/A

Though it could be nice to add the docs for that for Docker Compose, users have to do the docker-compose run --rm miner first to get through authentication if they have 2FA enabled before they can just run docker-compose up -d normally.


What do you think?
Maybe next week I could see if I have time to contribute this, at least with the cookie string.

Also thanks for merging the Docker support! I only just noticed that's a thing today! ^-^'

@SethFalco SethFalco added the enhancement New feature or request label Jul 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
1 participant