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

player_transfer_history() throwing error for some players #137

Open
JaseZiv opened this issue Jun 19, 2022 · 2 comments
Open

player_transfer_history() throwing error for some players #137

JaseZiv opened this issue Jun 19, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@JaseZiv
Copy link
Owner

JaseZiv commented Jun 19, 2022

There was an issue similar to this (#127).

For some players, player_transfer_history() throws errors. It appears as though when the player retires, or either joins from 'Without Club' or ends up 'Without Club' is handled somewhat differently.

df <- player_transfer_history("https://transfermarkt.com/jack-rodwell/profil/spieler/57079")

Error in data.frame(player_name = as.character(player_name), season = as.character(season),  : 
  arguments imply differing number of rows: 1, 0

This is because of the fact that this player joined his current club from 'Without Club':

image

@haugeotp
Copy link

Following your fix of this error, there is now a problem with the country_from and country_to columns being empty or in some cases containing "Without club". The picture below is obtained by running the following code:

test <- player_transfer_history(player_urls = "https://www.transfermarkt.com/jack-rodwell/profil/spieler/57079")

image

@JaseZiv JaseZiv reopened this Jun 20, 2022
@JaseZiv
Copy link
Owner Author

JaseZiv commented Jun 20, 2022

The country_from and country_to values are no longer exposed for scraping as they once were. I haven't yet found an elegant solution to fix this so will reopen this issue

@JaseZiv JaseZiv added the enhancement New feature or request label Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants