如何从此页面中的图表中刮擦数据?

发布于 2025-02-06 09:30:39 字数 186 浏览 3 评论 0原文

我正在寻找一种刮擦数据的方法使用硒。我说的是在共享页面中的平价历史记录图。不幸的是,我不知道如何刮擦图表,所以我在这里问你。谢谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

第几種人 2025-02-13 09:30:39

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:

dataPriceFloorETHdataPriceFloorUSDdataVolumeETHdataVolumeUSDdatessales
5.58531284511.5526561.42021-07-30T00:00:00.000Z2
5.495312637102.7262362372021-07 -30T08:00:00.000Z10
5.454712544121.422792282021-07-30T16:00:00.000Z19
5.530112717234.0095381482021-07-31T00:00:00.000Z29
6.330415588418.7711.03118e+062021-07-31T08 :00:00.000Z58

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:

dataPriceFloorETHdataPriceFloorUSDdataVolumeETHdataVolumeUSDdatessales
5.58531284511.5526561.42021-07-30T00:00:00.000Z2
5.495312637102.7262362372021-07-30T08:00:00.000Z10
5.454712544121.422792282021-07-30T16:00:00.000Z19
5.530112717234.0095381482021-07-31T00:00:00.000Z29
6.330415588418.7711.03118e+062021-07-31T08:00:00.000Z58
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文