Open jemorriso opened 3 years ago
Don't work on Windows 7, Python 3.8(x86)
c:\Helper\full_scraper>python op.py
Traceback (most recent call last):
File "op.py", line 8, in
Huh. I can't explain that, but the changes in this pull request should not be what's causing that error. Have you tried running the unforked code?
Huh. I can't explain that, but the changes in this pull request should not be what's causing that error. Have you tried running the unforked code?
In my case, I had to manually update all packages to the latest: pip list -o
First of all thanks for creating this library! I was planning on creating a scraper to get WHL and OHL odds but luckily I found this which saved me a ton of time. I tried to leave as much of the code in an unchanged state, but inevitably I had to make some changes. This is a work in progress and some stuff is rough around the edges.
Might be best to run it with
DEBUG
set to true in both scraper and op so you can get a sense of what the code is doing.I added a bunch of config files that I used for testing along with their output files as examples. These do not need to be included.
I've never made a pull request before so sorry if I didn't follow guidelines properly. Let me know what you think!
Proposed Changes
Adding a bunch of functionality to full_scraper. Most of the changes are in
scraper.py
. Depending on the configuration provided by the user (adding to previous config found insports.json
) the scraper will behave exactly how it did previously, or it will go to the game link and scrape odds for sportsbook / bet market / bet options.This is a breaking change.
Description
Config JSON file
New config options (they are optional):
seasons
:outcome_headers
:bet_type
:sub_bet_type
:odds_sources
:bet_options
:example URL:
https://www.oddsportal.com/hockey/canada/ohl/flint-firebirds-windsor-spitfires-40a8ssXS/#home-away;1
op.py
New global variables:
DEBUG
:DELETE_FILES
:Attributes added to
working_seasons
elements:models.py
odds
as an attribute onGame
scraper.py
New global variables:
DEBUG
:Functions:
get_populate_odds_method
:default_populate_odds
:populate_games_into_season
previously.populate_odds_detailed
:game
variable like the scraper does inpopulate_games_into_season
.open_rows
:scrape_odds_detailed
:To Do
seasons
config optionDEBUG
should be present in one file only.Issues
default_populate_odds
and the newodds
attribute on theGame
model don't really work together