Reputation: 35
I am trying to import this live value into google sheets using importxml and while I have been successful with other sites this one is giving me some issues.
Currently I am using.
=IMPORTXML("https://dex.guru/token/0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c-bsc","//div[@class='token-value']")
Which returns "error: Imported content is empty".
Any assistance is appreciated especially if it helps me better understand what I am doing wrong. Meanwhile I will keep plucking away at it :D
Upvotes: 0
Views: 425
Reputation: 4038
Unfortunately, the reason why the IMPORTXML function returns Imported content is empty
is because the data from the URL is dynamically being controlled by JavaScript, according to the answer from IMPORTHTML or IMPORTXML to collect data from a site post. Thus, the function cannot scrape data from that URL.
I've also tested disabling the Javascript on my browser when accessing the https://dex.guru/token/0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c-bsc and I have confirmed that the data is indeed being controlled by it as the browser showed the message You need to enable JavaScript to run this app
.
Alternatively, you can still scrape data from dex.guru URL if they have an available API to use. However, upon checking their website, the API option is not yet available.
Upvotes: 0