Skip to main content

Simple Oddsportal Scraper

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for bookie-scrapers, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size bookie_scrapers-0.2.0-py3-none-any.whl (7.3 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size bookie-scrapers-0.2.0.tar.gz (4.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page