j-andrews7/kenpompy

Issue Pulling Misc. Team Stats - Defense without Defining a 'season'

Closed this issue · 2 comments

I am working on using the package to pull the Miscellaneous Team Stats - Defense page and am encountering an error. I successfully pulled the Offense page with the first line, but the second line (to pull the defense data) is bombing.

image

In your summary.py file where you define your get_teamstats function, it looks like there is a small typo on line 150:
url = url + '?od=d'

the '?' should be an '&' sign.

You have this correct in line 147, but since that is within the 'if season:' loop, it forces the user to insert a season. By updating line 150 to the correct syntax, I think it would allow users to request the Defense data without defining a season (which on the website defaults to current season).

image

As I was writing this, inserted a value for 'season' and was able to pull the data. Just a potential enhancement I noticed. Thanks for the package, its awesome!

This should be fixed in the latest release.