A CLI tool for scraping soccer odds from the odds portal site.
you can install the odds-portal package globally using npm or yarn:
npm install -g odds-portal-scraper
yarn global add odds-portal-scraper
To use odds-portal, run the odds-portal command followed by the subcommand you want to use.
historic <leagueName> <startYear> <endYear>
Scrape historic odds data for a given soccer league between two years.
- : The name of the soccer league to scrape odds for. Use the leagues command to see available league names.
- : The start year of the time range to scrape odds for (e.g. 2019).
- : The end year of the time range to scrape odds for (e.g. 2021).
- --odds-format : the desired odds format
- --local : The directory to output the scraped odds data as a JSON file.
- --s3 : The bucketName to output the scraped odds data as a JSON file.
Example usage:
odds-portal historic premier-league 2019 2021 --local ./data --odds-format eu
This will scrape historic odds data for the English Premier League between 2019 and 2021.
next-matches <leagueName>
Scrape next matches odds data for a given soccer league between two years.
- : The name of the soccer league to scrape odds for. Use the leagues command to see available league names.
- --odds-format : the desired odds format
- --local : The directory to output the scraped odds data as a JSON file.
- --s3 : The bucketName to output the scraped odds data as a JSON file.
Example usage:
odds-portal next-matches --output-dir ./data --odds-format eu
This will scrape historic odds data for the English Premier League between 2019 and 2021.
odds-portal soccer-leagues
Displays a list of available soccer leagues that odds can be scraped for.
Example usage:
odds-portal soccer-leagues
odds-portal odds-format
Displays a list of available odds-format.
Example usage:
odds-portal odds-format
If you find any bugs or issues with odds-portal, please open an issue on the GitHub repository. Pull requests are also welcome!
This project is licensed under the MIT License.