Skip to content

muuusso/soccerapi-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

soccerapi-server

soccerapi-server is a simple script which interact with bookmakers site using a Chromium browser. There are some actions that are hard (if not impossible) to perform with http requests only; the purpose of this repository is to perform these actions and expose their results through a simple http server.

Installation & Usage

If you want that every run smoothly in background with now window popping up or warring about dependencies just use Docker.

After having Docker daemon on your local machine install soccerapi-server with

docker pull s1m0n38/soccerapi

This command pull the soccerapi image from Docker Hub to your local machine. The image is quite heavy (~1.6 GB) because packed all the dependencies needed to run soccerapi-server (linux, node, chromium, graphical library to run chromium in "headful" mode).

After you have s1m0n38/soccerapi on your local machine every time you want to run it use

docker run -p 5000:5000 s1m0n38/soccerapi

Bet365 X-Net-Sync-Term

At the beginning of 2021 bet365 implement authentication with X-Net-Sync-Term header for pre-match odds. It's now mandatory to send a valid X-Net-Sync-Term header with every http requests. This XNST (X-Net-Sync-Term) is generated by client side javascript but due to obfuscation is hard to replicate on your own. Another approach to generate a valid XNST is with a browser and then use the newly generated XNST for your http requests.

soccerapi-server every 10 minutes generates a valid XNST and exposes it on the localhost. While the docker container is running in background (see Installation & Usage) you have a valid X-Net-Sync-Term at http://localhost:5000/bet365.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 71.2%
  • Dockerfile 28.8%