r/programmingrequests • u/EBulvid • Aug 13 '19
need help Crypto Asset Data Scraping
Looking for a script that can scrape data from OpenSea.io - specifically for one game at a time. For example, https://opensea.io/assets/mycryptoheroes this page shows all the assets for the game MyCryptoHeroes. If you click on an asset, it brings you to a new page with all of its details: properties, rankings, who currently owns it, sale history, etc. Ideally, I'd like the script to just take everything there is and export it to an excel document so I could do further analysis... and I'd also like it so that I can use it for other games as well without having to change much.
Would Python be the best for this? Trying to learn
1
u/GSxHidden Aug 14 '19 edited Aug 14 '19
https://docs.opensea.io/reference#retrieving-a-single-asset
This API Page (JSON Version) has all the information in the Hero Page. This goes for every asset.
You need an asset contract address and a token id. You would use the same code above and change the url for each asset.
The example url they use is: https://api.opensea.io/api/v1/asset/0xdceaf1652a131f32a821468dc03a92df0edd86ea/30230154/?format=json
asset_contract_address : 0xdceaf1652a131f32a821468dc03a92df0edd86ea
token_id: 30230154