Fixed ou values
This commit is contained in:
parent
df1c290dc6
commit
de8485cf37
@ -15,7 +15,7 @@ fullObj = []
|
|||||||
|
|
||||||
start_year = 1952
|
start_year = 1952
|
||||||
|
|
||||||
for year in tqdm(range(start_year, 1954)):
|
for year in tqdm(range(start_year, 2025)):
|
||||||
|
|
||||||
with open("src/data/"+str(year)+".html") as fp:
|
with open("src/data/"+str(year)+".html") as fp:
|
||||||
soup = BeautifulSoup(fp, 'html.parser')
|
soup = BeautifulSoup(fp, 'html.parser')
|
||||||
@ -50,20 +50,20 @@ for year in tqdm(range(start_year, 1954)):
|
|||||||
else:
|
else:
|
||||||
spreadVal = -1
|
spreadVal = -1
|
||||||
|
|
||||||
ouValSearch = re.search(r'.\s-?(\d+)', cells[cursor+8].string)
|
if cells[cursor+9].length is None:
|
||||||
if ouValSearch:
|
ouVal = None
|
||||||
ouVal = ouValSearch.group(1)
|
|
||||||
else:
|
else:
|
||||||
ouVal = -1
|
ouVal = cells[cursor+9].string
|
||||||
|
|
||||||
game["spread"] = spreadVal
|
game["spread"] = spreadVal
|
||||||
game["ou"] = ouVal
|
game["ou"] = ouVal
|
||||||
|
|
||||||
if spreadVal != -1 and ouVal != -1:
|
if spreadVal != -1 and ouVal:
|
||||||
game["pScore"] = calcPredictedScore(game["sF"],game["sU"],spreadVal,ouVal)
|
game["pScore"] = calcPredictedScore(game["sF"],game["sU"],spreadVal,ouVal)
|
||||||
|
|
||||||
fullObj.append(game)
|
fullObj.append(game)
|
||||||
except:
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
print("Error parsing " + str(year))
|
print("Error parsing " + str(year))
|
||||||
|
|
||||||
objson = json.dumps(fullObj, indent=4)
|
objson = json.dumps(fullObj, indent=4)
|
||||||
|
152406
src/data/odds_data_abbr.json
152406
src/data/odds_data_abbr.json
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user