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

Scraping of market_value_history is broken #73

Open
dcaribou opened this issue Sep 28, 2023 · 5 comments
Open

Scraping of market_value_history is broken #73

dcaribou opened this issue Sep 28, 2023 · 5 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@dcaribou
Copy link
Owner

Parent issue → dcaribou/transfermarkt-datasets#215

The attribute market_value_history is coming as null in the latest runs, likely due to an upstream change on Transfermarkt side.

$ scrapy crawl players -a parents=samples/clubs.json -s USER_AGENT="..." | jq '.market_value_history'
null
null
null
...
@dcaribou
Copy link
Owner Author

The html used for extracting the market_value_history has changed significantly on a recent update in Transfermarkt, and the existing logic for extracting the data does no longer work

def parse_market_history(self, response: Response):

The new html uses an svg graph which appears quite hard to reverse-engineer at this
point.

Screenshot 2023-09-28 at 17 19 18

@dcaribou dcaribou added the help wanted Extra attention is needed label Sep 28, 2023
@LarchLiu
Copy link
Contributor

I found that there will be a request on this page, so maybe that helps a bit.

Request URL:
https://www.transfermarkt.com/ceapi/marketValueDevelopment/graph/28003

微信截图_20230930175604

@dcaribou
Copy link
Owner Author

Ah, and it's an open API 🙌
This is super helpful, even the response format is the same as the scraped market_value_history object.

@LarchLiu
Copy link
Contributor

LarchLiu commented Oct 9, 2023

Should we create a new player_valuations crawler with this API?
Seems like it just in development?

@n-richaud
Copy link

the old graph is still available on this page : https://www.transfermarkt.fr/dimitri-payet/marktwertverlauf/spieler/37647

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants