Marg09
Marg09

Reputation: 1

Getting the URL where the data is

So I'm trying to get some data from this site. https://www.futbin.com/20/player/24255/iago-aspas . As you can see, there are two types of graphs there, one showing the price of the card by day (Daily Graph), and the other one showing the price by each hour the last 3 days (Hourly Graph).

Now, I don't have any type of problem getting the data from the Daily Graph, I'm doing it like this.

r = requests.get('https://www.futbin.com/20/playerGraph?type=daily_graph&year=20&player={0}'.format(id))

I'm using the ID from the player to get the data and this is what I get.

Data from Daily Graph

But now, I'm not sure on how to get the data from the "Hourly Graph".

Upvotes: 0

Views: 304

Answers (1)

Marat
Marat

Reputation: 15738

  • Open developer tools in the browser before clicking on "Hourly Graph" (usually the hotkey is F12)
  • select Network tab in developer tools. Optionally clear the history
  • click "Hourly Graph". You'll see a new request with a URL like this: https://www.futbin.com/20/playerGraph?type=today&year=20&player=192629&set_id=

Same strategy works for most other websites

Upvotes: 1

Related Questions