Skip to content

mikha-dev/bookie_scrapers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OddsPortal scraper

PyPI version

import functools
import logging

from scrapers.oddsportal import OddsPortal
from scrapers.repositories import csv_repository

logging.basicConfig(level=logging.INFO)


portal = OddsPortal(
    url="https://www.oddsportal.com/soccer/england/premier-league/",
    callback=functools.partial(csv_repository, path='data/pl.csv')
).start()

Installation:

$ pip install bookie-scrapers

Run:

Since we are "tabbing" the windows it will switch focus to the browser, running it within a virtual framebuffer is preferable if you do not run it on a dedicated server.

$ xvfb-run python main.py

For testing purposes one can run the script as is and watch the browser switch tabs.

Requirements

chromedriver for your version of google chrome must be in your PATH

Xvfb if you're going running within virtual buffer

https://chromedriver.chromium.org/

TODO:

  • Reload crashed windows
  • Add correct waits instead of python time.sleep(.)
  • Add support for other browsers than google Chrome/Chromium
  • Add support for custom repositories
  • Add more bookies and customizable scrapers
  • Add Docker support

About

Webscraper for oddsportal

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages