NFLOddsVis/scrape_odds.py

11 lines
276 B
Python
Raw Normal View History

2025-01-22 21:34:06 -05:00
import requests
2025-02-08 22:27:38 -05:00
for year in range(2024, 2025):
2025-01-22 21:34:06 -05:00
URL = "https://www.sportsoddshistory.com/nfl-game-season/?y="+str(year)
page = requests.get(URL)
2025-02-08 22:27:38 -05:00
f = open("src/data/"+str(year)+".html", "w", encoding="utf-8")
2025-01-22 21:34:06 -05:00
f.write(page.text)
f.close
print("Downloaded " + str(year))