Giter Club home page Giter Club logo

valorant-watcher's Introduction

Valorant watcher

I spent two days watching Valorant streams to get a drop. I got bored...

GitHub package.json version GitHub GitHub repo size GitHub issues

Requirements

  • Windows or Linux OS
  • Network connection (So obvious...)
  • Nodejs and NPM
  • screen (Optional, just for background running)

Installation

  1. Login your twitch account
  2. Open inspector(F12 or Ctlr+Shift+I) on main site
  3. Find stored cookie section
  4. Copy auth-token and the token's expires date
  5. Clone this repo
  6. Install the dependencies with npm install
  7. After start the program with npm start

Docker

Docker Cloud Build Status Docker Image Version (latest by date) Docker Pulls Docker Image Size (latest by date)

Requirements

Useage

  1. Download docker-compose-example.yml
  2. Rename docker-compose.yml
  3. Replace environments
  4. Run docker-compose up -d

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)

Troubleshooting

How token does it look like?

auth-token: rxk38rh5qtyw95fkvm7kgfceh4mh6u
expire date: 2020-04-13T22:22:22.010Z


Setting Up Chrome Linux Sandbox

In order to protect the host environment from untrusted web content, Chrome uses multiple layers of sandboxing. For this to work properly, the host should be configured first. If there's no good sandbox for Chrome to use, it will crash with the error No usable sandbox!.

If you absolutely trust the content you open in Chrome, you can launch Chrome with the --no-sandbox argument:

const browser = await puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox']});

NOTE: Running without a sandbox is strongly discouraged. Consider configuring a sandbox instead.

There are 2 ways to configure a sandbox in Chromium.

[recommended] Enable user namespace cloning

User namespace cloning is only supported by modern kernels. Unprivileged user namespaces are generally fine to enable, but in some cases they open up more kernel attack surface for (unsandboxed) non-root processes to elevate to kernel privileges.

sudo sysctl -w kernel.unprivileged_userns_clone=1

[alternative] Setup setuid sandbox

The setuid sandbox comes as a standalone executable and is located next to the Chromium that Puppeteer downloads. It is fine to re-use the same sandbox executable for different Chromium versions, so the following could be done only once per host environment:

# cd to the downloaded instance
cd <project-dir-path>/node_modules/puppeteer/.local-chromium/linux-<revision>/chrome-linux/
sudo chown root:root chrome_sandbox
sudo chmod 4755 chrome_sandbox
# copy sandbox executable to a shared location
sudo cp -p chrome_sandbox /usr/local/sbin/chrome-devel-sandbox
# export CHROME_DEVEL_SANDBOX env variable
export CHROME_DEVEL_SANDBOX=/usr/local/sbin/chrome-devel-sandbox

You might want to export the CHROME_DEVEL_SANDBOX env variable by default. In this case, add the following to the ~/.bashrc or .zshenv:

export CHROME_DEVEL_SANDBOX=/usr/local/sbin/chrome-devel-sandbox

By puppeteer wiki: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md


streamers.json is empty?

Try to again with higher delay. Default delay:

const scrollDelay = 2000;

Something went wrong?

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

const browser = await puppeteer.launch({ headless: true , ignoreDefaultArgs: ['--mute-audio']});

Support

Donations

Buy Me A Coffee

Disclaimer

These codes for educational and research purposes only. Do not attempt to violate the law with anything contained here. I will not be responsible for your any illegal actions.

valorant-watcher's People

Contributors

d3vl0per 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.