betbot.data package¶
Submodules¶
betbot.data.FootballDataCoUk module¶
- class betbot.data.FootballDataCoUk.FootballDataUk(data_path: str)¶
Bases:
object
Class that handles retrieving data from football-data.co.uk
- TEAM_MAP = {'Augsburg': 'FCA', 'Bayern Munich': 'FCB', 'Bielefeld': 'DSC', 'Bochum': 'BOC', 'Darmstadt': 'D98', 'Dortmund': 'BVB', 'Dresden': 'SGD', 'Ein Frankfurt': 'SGE', 'Erzgebirge Aue': 'AUE', 'FC Koln': 'KOE', 'Fortuna Dusseldorf': 'F95', 'Freiburg': 'SCF', 'Greuther Furth': 'SGF', 'Hamburg': 'HSV', 'Hannover': 'H96', 'Hansa Rostock': 'FCH', 'Heidenheim': 'HDH', 'Hertha': 'BSC', 'Hoffenheim': 'TSG', 'Holstein Kiel': 'KIE', 'Ingolstadt': 'FCI', 'Karlsruhe': 'KSC', 'Leverkusen': 'B04', "M'gladbach": 'BMG', 'Mainz': 'M05', 'Nurnberg': 'FCN', 'Paderborn': 'SCP', 'RB Leipzig': 'RBL', 'Regensburg': 'SSV', 'Sandhausen': 'SVS', 'Schalke 04': 'S04', 'St Pauli': 'STP', 'Stuttgart': 'VFB', 'Union Berlin': 'FCU', 'Werder Bremen': 'BRE', 'Wolfsburg': 'WOB'}¶
- __init__(data_path: str)¶
Initializes the object :param data_path: The path in which to store the data files
- download_history()¶
Download history for the first and second bundesliga :return: None
- get_history_matches() List[Dict[str, Union[str, int, float]]] ¶
Retrieves data on historical bundesliga and bundesliga 2 matches :return: A list of match dictionaries
- get_odds() Dict[Tuple[str, str], Tuple[float, float, float]] ¶
Loads currently available odds :return: The current odds (home, draw, away) mapped to home/away teams
- static load_history_file(history_file: str) List[Dict[str, str]] ¶
Loads the contents of a history file :param history_file: The history file to load :return: A list of match dictionaries
- load_matches(data_file: str) List[Dict[str, Union[str, int, float]]] ¶
Loads match data from a single CSV file :param data_file: The path to the CSV file :return: The match data
betbot.data.OddsPortal module¶
- class betbot.data.OddsPortal.OddsPortal¶
Bases:
object
Class that handles retrieving bet data using oddsportal.com
- TEAM_MAP = {'Arminia Bielefeld': 'DSC', 'Aue': 'AUE', 'Augsburg': 'FCA', 'B. Monchengladbach': 'BMG', 'Bayer Leverkusen': 'B04', 'Bayern Munich': 'FCB', 'Bochum': 'BOC', 'Braunschweig': 'BRA', 'Darmstadt': 'D98', 'Dortmund': 'BVB', 'Dortmund II': 'BV2', 'Duisburg': 'MSV', 'Dusseldorf': 'F95', 'Eintracht Frankfurt': 'SGE', 'FC Koln': 'KOE', 'Freiburg': 'SCF', 'Freiburg II': 'SC2', 'Greuther Furth': 'SGF', 'Hallescher': 'HFC', 'Hamburger SV': 'HSV', 'Hannover': 'H96', 'Hansa Rostock': 'FCH', 'Heidenheim': 'HDH', 'Hertha Berlin': 'BSC', 'Hoffenheim': 'TSG', 'Holstein Kiel': 'KIE', 'Ingolstadt': 'FCI', 'Kaiserslautern': 'FCK', 'Karlsruher': 'KSC', 'Magdeburg': 'FCM', 'Mainz': 'M05', 'Mannheim': 'MAN', 'Meppen': 'SVM', 'Munich 1860': 'MÜN', 'Nurnberg': 'FCN', 'Paderborn': 'SCP', 'RB Leipzig': 'RBL', 'Regensburg': 'SSV', 'SG Dynamo Dresden': 'SGD', 'Saarbrucken': 'FCS', 'Sandhausen': 'SVS', 'Schalke': 'S04', 'St. Pauli': 'STP', 'Stuttgart': 'VFB', 'TSV Havelse': 'HAV', 'Turkgucu Munchen': 'TÜR', 'Union Berlin': 'FCU', 'Verl': 'SCV', 'VfL Osnabruck': 'OSN', 'Viktoria Berlin': 'VBE', 'Viktoria Koln': 'VKO', 'Wehen': 'WIE', 'Werder Bremen': 'BRE', 'Wolfsburg': 'WOB', 'Wurzburger Kickers': 'WÜR', 'Zwickau': 'ZWI'}¶
- __init__()¶
Initializes the oddsportal scraper
- get_odds(league: str) Dict[Tuple[str, str], Tuple[float, float, float]] ¶
Retrieves the odds for upcoming matches from oddsportal.com :param league: The league to search for :return: Odds for the matches (home, draw, odds)