[英]Trying to print all owners of an NFT collection on OpenSea using API and Python 3
[英]How to get the listed NFT of a collection on OPENSEA
嘿,我试图在 opensea 上获取一个集合的列出的 nfts,但它不能使用 API 即时通讯,但出于某种原因,所有我都得到一个 cloudflare 块,有没有办法绕过它,或者能够获取 nft 的集合统计信息python 中每个列出的 nft 的集合。我已经尝试过 cloudflare 绕过模块,但有时它是不确定的。
import requests
url = "https://opensea.io/collection/clonex?tab=activity&search[isSingleCollection]=true&search[eventTypes][0]=AUCTION_CREATED"
headers = {
"Accept": "application/json",
"X-API-KEY": ""
}
response = requests.request("GET", url, headers=headers)
print(response.text)
https://docs.opensea.io/reference/getting-assets
首先,它应该是“api.opensea.io”而不是“opensea.io”。
其次,集合的名称应该作为参数添加,而不是直接使用。
您可以使用您想要的参数尝试上面的链接。
例如,在您的情况下,它可能应该是这样的:
https://api.opensea.io/api/v1/assets?collection_slug=clonex&order_direction=desc&limit=20&include_orders=false
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.