I'm using Python on windows and I want to get a list of elements shown in this url: https://app.teritori.com/collection/tori-tori1999u8suptza3rtxwk7lspve02m406xe7l622erg3np3aq05gawxsrh9g0p/
The site is made with React, so I'm using Selenium instead of Splash. (I never used Splash before and I couldn't got it working here)
When you load the page, there's a list of Gorillas NFTs and it's created by some React Functions.
I used React Developer Tools. You click for Inspect on this spot:
And you can see prop data of that list:
Then, I used the Inspect the matching DOM Element, comeback to see Elements Property and it picked up that element (1), buy data is on its parent element (2)
Now that I found the data, how can I access this data on Selenium? I didn't found much information about how to do it in Python, so I'm developing my own 'solution' (here: How to get props React component using Selenium in Python) but I already found some problems there and maybe you can give me a better approach of doing it.
This is the component class shown by React Developer Tools: css-1dbjc4n r-150rngu r-eqz5dr r-16y2uox r-1wbh5a2 r-11yh6sk r-1rnoaur r-1sncvnh r-13qz1uu
And this is the class of parent component with data on HTML DOM: css-1dbjc4n r-1awozwy r-13qz1uu
This is the property path for the data: __reactProps$42ovhe6scao.children.props.data
And this is the data I want to get:
[
{
"id": "tori-tori1999u8suptza3rtxwk7lspve02m406xe7l622erg3np3aq05gawxsrh9g0p-5711",
"networkId": "teritori",
"imageUri": "https://nftstorage.link/ipfs/bafybeiepdb25hm64cvavx6v7i7bynfnalkeodicqnbd6bvtvmld5fq46ey/nft.png",
"name": "Yield Gorilla #5711",
"mintAddress": "",
"price": "1500000",
"denom": "ibc/A670D9568B3E399316EEDE40C1181B7AA4BD0695F0B37513CE9B95B977DFC12E",
"isListed": true,
"textInsert": "",
"collectionName": "Yield Gorillas",
"ownerId": "tori-tori1vcrzezdkzqga9ns6x26pyj6plxus2gwmcghpfz"
},
{
"id": "tori-tori1999u8suptza3rtxwk7lspve02m406xe7l622erg3np3aq05gawxsrh9g0p-455",
"networkId": "teritori",
"imageUri": "https://nftstorage.link/ipfs/bafybeidb3ro4kt4nkyospjseszlwagd7rfzhla67wakz5ivgwazpgm7h4u/nft.png",
"name": "Yield Gorilla #455",
"mintAddress": "",
"price": "1500000",
"denom": "ibc/A670D9568B3E399316EEDE40C1181B7AA4BD0695F0B37513CE9B95B977DFC12E",
"isListed": true,
"textInsert": "",
"collectionName": "Yield Gorillas",
"ownerId": "tori-tori1tcy6kl3m4v66xa8acckff3dc26hgw4ftpa0zxf"
},
{
"id": "tori-tori1999u8suptza3rtxwk7lspve02m406xe7l622erg3np3aq05gawxsrh9g0p-483",
"networkId": "teritori",
"imageUri": "https://nftstorage.link/ipfs/bafybeicnoazhivater3f4yhprbpquhhqo7wtaiw3t34ufvm6xxgoex4tna/nft.png",
"name": "Yield Gorilla #483",
"mintAddress": "",
"price": "1500000",
"denom": "ibc/A670D9568B3E399316EEDE40C1181B7AA4BD0695F0B37513CE9B95B977DFC12E",
"isListed": true,
"textInsert": "",
"collectionName": "Yield Gorillas",
"ownerId": "tori-tori1vcrzezdkzqga9ns6x26pyj6plxus2gwmcghpfz"
},
{
"id": "tori-tori1999u8suptza3rtxwk7lspve02m406xe7l622erg3np3aq05gawxsrh9g0p-8717",
"networkId": "teritori",
"imageUri": "https://nftstorage.link/ipfs/bafybeibh3nqh3a3h5gxzmmnkdlqc44cilwjmmub5ll6luote3rafgplv4q/nft.png",
"name": "Yield Gorilla #8717",
"mintAddress": "",
"price": "1600000",
"denom": "ibc/A670D9568B3E399316EEDE40C1181B7AA4BD0695F0B37513CE9B95B977DFC12E",
"isListed": true,
"textInsert": "",
"collectionName": "Yield Gorillas",
"ownerId": "tori-tori1vcrzezdkzqga9ns6x26pyj6plxus2gwmcghpfz"
},
{
"id": "tori-tori1999u8suptza3rtxwk7lspve02m406xe7l622erg3np3aq05gawxsrh9g0p-3957",
"networkId": "teritori",
"imageUri": "https://nftstorage.link/ipfs/bafybeiftttvun7tt2s3mtauwolngrcgu45ialudr5eepsitys7skqqz2ti/nft.png",
"name": "Yield Gorilla #3957",
"mintAddress": "",
"price": "1600000",
"denom": "ibc/A670D9568B3E399316EEDE40C1181B7AA4BD0695F0B37513CE9B95B977DFC12E",
"isListed": true,
"textInsert": "",
"collectionName": "Yield Gorillas",
"ownerId": "tori-tori1vcrzezdkzqga9ns6x26pyj6plxus2gwmcghpfz"
},
{
"id": "tori-tori1999u8suptza3rtxwk7lspve02m406xe7l622erg3np3aq05gawxsrh9g0p-3394",
"networkId": "teritori",
"imageUri": "https://nftstorage.link/ipfs/bafybeifih3ctdvaiof4in55t5ljiv2z4wlibbotvjvkrnfio6tudmkos2a/nft.png",
"name": "Yield Gorilla #3394",
"mintAddress": "",
"price": "1600000",
"denom": "ibc/A670D9568B3E399316EEDE40C1181B7AA4BD0695F0B37513CE9B95B977DFC12E",
"isListed": true,
"textInsert": "",
"collectionName": "Yield Gorillas",
"ownerId": "tori-tori1vcrzezdkzqga9ns6x26pyj6plxus2gwmcghpfz"
},
{
"id": "tori-tori1999u8suptza3rtxwk7lspve02m406xe7l622erg3np3aq05gawxsrh9g0p-4587",
"networkId": "teritori",
"imageUri": "https://nftstorage.link/ipfs/bafybeid7wigixqds7vvipig3m5sxd7oi5iu6y2lruqqrch2d4etcnamey4/nft.png",
"name": "Yield Gorilla #4587",
"mintAddress": "",
"price": "1600000",
"denom": "ibc/A670D9568B3E399316EEDE40C1181B7AA4BD0695F0B37513CE9B95B977DFC12E",
"isListed": true,
"textInsert": "",
"collectionName": "Yield Gorillas",
"ownerId": "tori-tori1vcrzezdkzqga9ns6x26pyj6plxus2gwmcghpfz"
},
{
"id": "tori-tori1999u8suptza3rtxwk7lspve02m406xe7l622erg3np3aq05gawxsrh9g0p-8215",
"networkId": "teritori",
"imageUri": "https://nftstorage.link/ipfs/bafybeieltyvjoh2pweeoe5vgkz4c3jhgiey4jlsvdwnelfx5f7kw2pob6q/nft.png",
"name": "Yield Gorilla #8215",
"mintAddress": "",
"price": "1600000",
"denom": "ibc/A670D9568B3E399316EEDE40C1181B7AA4BD0695F0B37513CE9B95B977DFC12E",
"isListed": true,
"textInsert": "",
"collectionName": "Yield Gorillas",
"ownerId": "tori-tori1vcrzezdkzqga9ns6x26pyj6plxus2gwmcghpfz"
},
{
"id": "tori-tori1999u8suptza3rtxwk7lspve02m406xe7l622erg3np3aq05gawxsrh9g0p-6343",
"networkId": "teritori",
"imageUri": "https://nftstorage.link/ipfs/bafybeihios52woout2psbvgy3irswugckt5h3ot24c7iz6wlhsdu2llqgi/nft.png",
"name": "Yield Gorilla #6343",
"mintAddress": "",
"price": "1600000",
"denom": "ibc/A670D9568B3E399316EEDE40C1181B7AA4BD0695F0B37513CE9B95B977DFC12E",
"isListed": true,
"textInsert": "",
"collectionName": "Yield Gorillas",
"ownerId": "tori-tori1vcrzezdkzqga9ns6x26pyj6plxus2gwmcghpfz"
},
{
"id": "tori-tori1999u8suptza3rtxwk7lspve02m406xe7l622erg3np3aq05gawxsrh9g0p-3496",
"networkId": "teritori",
"imageUri": "https://nftstorage.link/ipfs/bafybeiau2vaylrwjqaezhumthykiwe6w2smvfcy66y3beaymzh5mk75k4y/nft.png",
"name": "Yield Gorilla #3496",
"mintAddress": "",
"price": "1640000",
"denom": "ibc/A670D9568B3E399316EEDE40C1181B7AA4BD0695F0B37513CE9B95B977DFC12E",
"isListed": true,
"textInsert": "",
"collectionName": "Yield Gorillas",
"ownerId": "tori-tori1hpwa2s8wdysel40wrgg3ptxacdh6uqgwh9d5ns"
},
{
"id": "tori-tori1999u8suptza3rtxwk7lspve02m406xe7l622erg3np3aq05gawxsrh9g0p-8787",
"networkId": "teritori",
"imageUri": "https://nftstorage.link/ipfs/bafybeiewdkkhm62doqptubdrussy6gdqnuhhfrbudobrauummq2ruuxlrq/nft.png",
"name": "Yield Gorilla #8787",
"mintAddress": "",
"price": "1640000",
"denom": "ibc/A670D9568B3E399316EEDE40C1181B7AA4BD0695F0B37513CE9B95B977DFC12E",
"isListed": true,
"textInsert": "",
"collectionName": "Yield Gorillas",
"ownerId": "tori-tori1hpwa2s8wdysel40wrgg3ptxacdh6uqgwh9d5ns"
},
{
"id": "tori-tori1999u8suptza3rtxwk7lspve02m406xe7l622erg3np3aq05gawxsrh9g0p-9437",
"networkId": "teritori",
"imageUri": "https://nftstorage.link/ipfs/bafybeiezugekygzlsvzizbsoayryq7hroxmhvig2mnadgxj3h2n6rq5adm/nft.png",
"name": "Yield Gorilla #9437",
"mintAddress": "",
"price": "1640000",
"denom": "ibc/A670D9568B3E399316EEDE40C1181B7AA4BD0695F0B37513CE9B95B977DFC12E",
"isListed": true,
"textInsert": "",
"collectionName": "Yield Gorillas",
"ownerId": "tori-tori1hpwa2s8wdysel40wrgg3ptxacdh6uqgwh9d5ns"
},
{
"id": "tori-tori1999u8suptza3rtxwk7lspve02m406xe7l622erg3np3aq05gawxsrh9g0p-2025",
"networkId": "teritori",
"imageUri": "https://nftstorage.link/ipfs/bafybeia6hvy2fzmuyn5z7znvgx2tunh6ggit4a7jeqh7cgbjzjhhmoil4a/nft.png",
"name": "Yield Gorilla #2025",
"mintAddress": "",
"price": "1650000",
"denom": "ibc/A670D9568B3E399316EEDE40C1181B7AA4BD0695F0B37513CE9B95B977DFC12E",
"isListed": true,
"textInsert": "",
"collectionName": "Yield Gorillas",
"ownerId": "tori-tori1hpwa2s8wdysel40wrgg3ptxacdh6uqgwh9d5ns"
},
{
"id": "tori-tori1999u8suptza3rtxwk7lspve02m406xe7l622erg3np3aq05gawxsrh9g0p-4448",
"networkId": "teritori",
"imageUri": "https://nftstorage.link/ipfs/bafybeic4fysqhhtvbt2l6b73tw6lybvbpohezpa2cduf4tiq3l5lntccma/nft.png",
"name": "Yield Gorilla #4448",
"mintAddress": "",
"price": "1650000",
"denom": "ibc/A670D9568B3E399316EEDE40C1181B7AA4BD0695F0B37513CE9B95B977DFC12E",
"isListed": true,
"textInsert": "",
"collectionName": "Yield Gorillas",
"ownerId": "tori-tori1hpwa2s8wdysel40wrgg3ptxacdh6uqgwh9d5ns"
},
{
"id": "tori-tori1999u8suptza3rtxwk7lspve02m406xe7l622erg3np3aq05gawxsrh9g0p-2226",
"networkId": "teritori",
"imageUri": "https://nftstorage.link/ipfs/bafybeie6bisjwylaaw6c3jpq7ibovimz4l4i3znudrho2ep6cw5fmbugwe/nft.png",
"name": "Yield Gorilla #2226",
"mintAddress": "",
"price": "1650000",
"denom": "ibc/A670D9568B3E399316EEDE40C1181B7AA4BD0695F0B37513CE9B95B977DFC12E",
"isListed": true,
"textInsert": "",
"collectionName": "Yield Gorillas",
"ownerId": "tori-tori18nqkyt7hcwdq2qwgs8e3yen2lgnc3u84q4q6pe"
},
{
"id": "tori-tori1999u8suptza3rtxwk7lspve02m406xe7l622erg3np3aq05gawxsrh9g0p-2648",
"networkId": "teritori",
"imageUri": "https://nftstorage.link/ipfs/bafybeig3krf6dlpw5qlvg7ms6dsajxnnktqeeyjgzbgwmlvkxubpzwoqle/nft.png",
"name": "Yield Gorilla #2648",
"mintAddress": "",
"price": "1650000",
"denom": "ibc/A670D9568B3E399316EEDE40C1181B7AA4BD0695F0B37513CE9B95B977DFC12E",
"isListed": true,
"textInsert": "",
"collectionName": "Yield Gorillas",
"ownerId": "tori-tori1hpwa2s8wdysel40wrgg3ptxacdh6uqgwh9d5ns"
},
{
"id": "tori-tori1999u8suptza3rtxwk7lspve02m406xe7l622erg3np3aq05gawxsrh9g0p-5649",
"networkId": "teritori",
"imageUri": "https://nftstorage.link/ipfs/bafybeiaolmcwcm2wzbti3eqejvv4use6nctpcudgaokpcth2qvqx4grvve/nft.png",
"name": "Yield Gorilla #5649",
"mintAddress": "",
"price": "1650000",
"denom": "ibc/A670D9568B3E399316EEDE40C1181B7AA4BD0695F0B37513CE9B95B977DFC12E",
"isListed": true,
"textInsert": "",
"collectionName": "Yield Gorillas",
"ownerId": "tori-tori1hpwa2s8wdysel40wrgg3ptxacdh6uqgwh9d5ns"
},
{
"id": "tori-tori1999u8suptza3rtxwk7lspve02m406xe7l622erg3np3aq05gawxsrh9g0p-9005",
"networkId": "teritori",
"imageUri": "https://nftstorage.link/ipfs/bafybeielmzg2rcdmvtxuot5zcyoahf7q6spskcgfiz2xufskcqii2575qa/nft.png",
"name": "Yield Gorilla #9005",
"mintAddress": "",
"price": "1670000",
"denom": "ibc/A670D9568B3E399316EEDE40C1181B7AA4BD0695F0B37513CE9B95B977DFC12E",
"isListed": true,
"textInsert": "",
"collectionName": "Yield Gorillas",
"ownerId": "tori-tori1km7luq0tgalnp9cfgm2rwrgzwgay79gu00qnu0"
}
]