Quick one: Can you get me an invite to PyBites slack?
Longer one -- I wondered if we could modify the project from getting data from Weather API to scraping data from here: https://www.pro-football-reference.com/
I ran a little test. This code:
from bs4 import BeautifulSoup
import requests
url = 'https://www.pro-football-reference.com/teams/was/2022.htm'
r = requests.get(url)
content = r.text
soup = BeautifulSoup(content, 'html.parser')
title = soup.title.text
print(f'Page Title: {title}')
returned this line:
Page Title: 2022 Washington Commanders Rosters, Stats, Schedule, Team Draftees, Injury Reports | Pro-Football-Reference.com so the data is scrapable.
I have some general ideas on what to do.
If this is not suitable for the Intro course, very happy to target one of the pre-existing projects.
I tried to send you an invite but apparently I don't have enough authority, will pass that on to Bob.
I think scraping that the football website is pretty similar in scope to scraping weather data and would be fine with me. The more motivated you are to work on your project, the better!
Hi Erik:
I ran a little test. This code:
returned this line:
Page Title: 2022 Washington Commanders Rosters, Stats, Schedule, Team Draftees, Injury Reports | Pro-Football-Reference.com
so the data is scrapable.I have some general ideas on what to do.
If this is not suitable for the Intro course, very happy to target one of the pre-existing projects.