Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for Uniform Number #68

Open
dylanavery720 opened this issue Dec 7, 2018 · 3 comments
Open

Request for Uniform Number #68

dylanavery720 opened this issue Dec 7, 2018 · 3 comments

Comments

@dylanavery720
Copy link

Hi @jaebradley ,

I was wondering if you had thought about adding the Uniform Number of a player to the HTTP response for season_totals. (So for Lebron James it would be {number: 23} for instance)

I think it would be very useful!

Dylan

@jaebradley
Copy link
Owner

@dylanavery720 this is a good idea!

So for season totals, the web page that is scraped is something like https://www.basketball-reference.com/leagues/NBA_2019_totals.html.

Because of that, I'm restricted by what's actually on the web page. Unfortunately, uniform number isn't really something that's available.

I did notice that there is a uniform numbers web page (https://www.basketball-reference.com/leagues/NBA_2019_numbers.html) but other than that I can't see or think of a suitable solution for returning uniform numbers across all players for a given season.

One thing that could be done is adding a player_information method that scrapes / parses individual player pages (like https://www.basketball-reference.com/players/j/jamesle01.html).

Hope this helps!

@tomkennedy22
Copy link

Hey @jaebradley , jumping in here, this issue has been open for a while. Has any work been done on some sort of player_information api to pull information off of player's pages? If not, I'd like to take a swing at it. Thanks!

@jaebradley
Copy link
Owner

jaebradley commented May 2, 2020

@tomkennedy22 nope, there hasn't been any work here - I've done some work to parse the player page in certain cases for the search API where basketball reference redirects to a specific player page when a single player matches a search query.

See:

page = PlayerPage(html=html.fromstring(response.content))

Hope that provides at least a bit of a start - let me know if you have any questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants