I'd like to scrape this table from Vegas Insider
I am a total beginner when it comes to web scraping. I have tried a few different ways via stackoverflow but haven't been able to nail it down.
This is as far as I have been able to get.
from bs4 import BeautifulSoup
import requests
source = requests.get('https://www.vegasinsider.com/college-basketball/odds/las-vegas/money/').text
soup = BeautifulSoup(source, "html.parser")
tbl = soup.find('table', class_='frodds-data-tbl')
for matchups in tbl.find_all('td', {'class': ['viCellBg1', 'oddsGameCell','cellTextNorm','cellTextNorm']}):
if matchups.span is not None:
gameDate = matchups.span.text
print(gameDate)
for b_ in matchups.find_all('b'):
print(b_.a.text)
I'd eventually send these results to a CSV and change the column headers to match the book names on the table. Any help here is appreciated.
