Home > Software design >  How to scrape Data from the chart in this Page?
How to scrape Data from the chart in this Page?

Time:06-11

I am looking for a way to scrape datas from this website using Selenium. I am talking about the Floor price history chart in the page shared. I unfortunately have no idea on how to scrape charts so I am here asking you. Thank you.

CodePudding user response:

You can use pandas to read the data from the API URL:

import pandas as pd

url = "https://api-bff.nftpricefloor.com/nft/bored-ape-yacht-club/chart/pricefloor?interval=all"
df = pd.read_json(url)

# print sample data:
print(df.head().to_markdown(index=False))

Prints:

dataPriceFloorETH dataPriceFloorUSD dataVolumeETH dataVolumeUSD dates sales
5.5853 12845 11.55 26561.4 2021-07-30T00:00:00.000Z 2
5.4953 12637 102.726 236237 2021-07-30T08:00:00.000Z 10
5.4547 12544 121.42 279228 2021-07-30T16:00:00.000Z 19
5.5301 12717 234.009 538148 2021-07-31T00:00:00.000Z 29
6.3304 15588 418.771 1.03118e 06 2021-07-31T08:00:00.000Z 58
  • Related