j-andrews7 / kenpompy

A simple yet comprehensive web scraper for kenpom.com.
https://kenpompy.readthedocs.io/en/latest/?badge=latest
GNU General Public License v3.0
70 stars 21 forks source link

Team Schedule #14

Closed dmeredith3 closed 2 years ago

dmeredith3 commented 2 years ago

First, thanks for making this! Its helped me out a lot. I am trying to pull all of the teams schedules from the website and when it gets to teams like Texas A&M or North Carolina A&T the kenpompy.team.get_schedule() fails. Looking at the code it looks like this is because it doesn't adjust for the fact that when the url has a & in it it is replaced by "%26". For example the url for Texas A&M should be https://kenpom.com/team.php?team=Texas+A%26M and not https://kenpom.com/team.php?team=Texas+A&M.

tom-wagner commented 2 years ago

Tackling this now locally, think it will be:

team = team.replace("&", "%26")

Edit: confirmed that the above is working

j-andrews7 commented 2 years ago

Sorry for the delay on this one, I'll try to take a look this weekend.