Get football teams season scores in a list or table in python

Question:
I’m trying to make a program in python that will scrape the scores of every game this season of a given football team. for example if I type in Panthers it will give me a table that looks like:

Date Panthers Team1 scores Team2 scores Opponent
08/13/22 Panthers 23 21 Commanders
08/19/22 Panthers 10 20 Patriots
08/26/22 Panthers 21 00 Bills
09/11/22 Panthers 24 26 Browns

and so on.

I tried sports.py and sportreference.py niether gave me the desired output. Can someone give me an example of the code I would use?

Is your problem scraping ang getting info or is it making table?

Getting the info. I can make it into a table.

Well you can use a free plan in some json api such as this or this

1 Like

You might like to check this example page for Scrapy (open source tool for web scraping) . I hope that helps.

2 Likes