Giter Site home page Giter Site logo

odds-portal-scraper's Introduction

Odds-portal CLI

A CLI tool for scraping soccer odds from the odds portal site.

Installation

you can install the odds-portal package globally using npm or yarn:

npm install -g odds-portal-scraper

yarn global add odds-portal-scraper

Usage

To use odds-portal, run the odds-portal command followed by the subcommand you want to use.

Available Commands

historic

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

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.

soccer-leagues

odds-portal soccer-leagues

Displays a list of available soccer leagues that odds can be scraped for.

Example usage:

odds-portal soccer-leagues

odds-format

odds-portal odds-format

Displays a list of available odds-format.

Example usage:

odds-portal odds-format

Contributing

If you find any bugs or issues with odds-portal, please open an issue on the GitHub repository. Pull requests are also welcome!

Licence

This project is licensed under the MIT License.

odds-portal-scraper's People

Contributors

mg30 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

magiceric

odds-portal-scraper's Issues

More leagues/lines

How do I get the odds for different leagues and other sports?
And what about extra lines (like over/under etc.)?

Error

Hello,
I installed the program as explained, but when I go to consult with the command that you indicate, the following error appears:

2023-08-14T18:13:40.342Z - INFO - start scraping: https://www.oddsportal.com/soccer/england/premier-league-2019-2020/results/
2023-08-14T18:13:49.112Z - INFO - start scraping: https://www.oddsportal.com/soccer/england/premier-league-2020-2021/results/
2023-08-14T18:13:55.819Z - INFO - start scraping: https://www.oddsportal.com/soccer/england/premier-league-2021-2022/results/
2023-08-14T18:14:31.547Z - ERROR - [{"status":"rejected","reason":{"name":"TimeoutError"}},{"status":"rejected","reason" :{"name":"TimeoutError"}},{"status":"rejected","reason":{"name":"TimeoutError"}}]
2023-08-14T18:14:31.548Z - INFO - closing browser

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.