Skip to content

RFBomb/Twitch-watcher

Β 
Β 

Repository files navigation

Twitch watcher

This is a fork that utilizes the HELIX API to determine who to watch

GitHub package.json version GitHub GitHub repo size GitHub issues

Features

  • πŸŽ₯ True HTTP Live Streaming support (Forget the #4000 error code)
  • πŸ” Cookie-based login
  • πŸ“œ Auto accept cookie policy
  • πŸ‘¨β€πŸ’» The choice of a random streamer with drop-enabled tag
  • 🀐 Unmuted stream
  • πŸ›  Detect mature content-based stream and interact with it
  • πŸ›‘ Proxy option
  • πŸ“½ Automatic lowest possible resolution settings
  • 🧰 Highly customizable codebase
  • πŸ“¦ Deployable to VPS by docker
  • 🏳️ Helpful support community
  • πŸ’¬ Multi language readme: πŸ‡«πŸ‡· README πŸ‡§πŸ‡· README πŸ‡·πŸ‡Ί README πŸ‡ΈπŸ‡° README

Grab your Login Token

  1. Login to your twitch account
  2. Open inspector(F12 or Ctrl+Shift+I) on main site
  3. Find the stored cookie section
  4. Copy auth-token -- This is your LoginToken

Getting your API Authorization Token

  1. Login to your twitch account
  2. go to this page I have set up: https://rfbomb.github.io/DockerWatcherAuthPage.io/
  3. Click the 'Authorize' button. This will send a request to the Twitch authorization server, which will provide a unique key, similar to the LoginToken keys above.
  4. Copy ApiToken once is it displayed on the page. This token will be used for the 'ApiAuthToken' variable.

Requirements

  • Windows or Linux OS
  • Network connection (Should be obvious...)
  • Nodejs and NPM

Installation

  1. Grab your Login & API Auth Tokens
  2. Clone this repo
  3. Install Chromium
  4. Locate Chromium executable:
    • Linux -> whereis chromium or whereis chromium-browser
    • Windows -> Usually the path to the Chromium executable is: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
  5. Navigate your command prompt / terminal into this the folder you downloaded the repo into
  6. Install the dependencies with npm install
  7. Start the program with npm start

Docker

Docker Image Version (latest by date) Docker Pulls Docker Image Size (latest by date)

Docker is a set of platform as a service (PaaS) products that uses OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files. All containers are run by a single operating system kernel and therefore use fewer resources than virtual machines.

Requirements

Usage

  1. Download docker-compose-example.yml
  2. Rename docker-compose.yml
  3. Customize Environment Variables
    • LoginToken environment variable
    • ApiAuthToken environment variable
    • streamersUrl environment variable
  4. Run with docker-compose up -d command

Dependencies

GitHub package.json dependency version (subfolder of monorepo) GitHub package.json dependency version (subfolder of monorepo) GitHub package.json dependency version (subfolder of monorepo) GitHub package.json dependency version (subfolder of monorepo) GitHub package.json dependency version (subfolder of monorepo) GitHub package.json dependency version (prod)

Troubleshooting

What do the tokens look like?

auth-token: rxk38rh5qtyw95fkvm7kgfceh4mh6u


Streamers.json is empty?

Try again with higher delay. Default delay:

const scrollDelay = 2000;

Go to code


Something went wrong?

Try non-headless mode. Set headless value to true, like this:

const showBrowser = true;

Go to code


Proxy?

Yes, of course:

const proxy = ""; // "ip:port" By https://github.com/Jan710

Go to code

OR

With Docker env:

proxy=PROXY_IP_ADDRESS:PROXY_PORT

Screenshot without non-headless mode

const browserScreenshot = false;

Go to code

Donation

Please donate to keep alive this project!

My Fork that uses the Helix API: Buy Me A Coffee

Original Source: Buy Me A Coffee

Support

Disclaimer

This code is for educational and research purposes only. Do not attempt to violate the law with anything contained here. I will not be responsible for any illegal actions. Reproduction and copy is authorised, provided the source is acknowledged.

About

Automatic watching the twitch to get Valorant drop

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 98.2%
  • Batchfile 1.1%
  • Dockerfile 0.7%