2

I am trying to import the "BTC network Power" from the url https://rollercoin.com/network-power/btc into excel.

Formula I am using:

=importXml("https://rollercoin.com/network-power/btc"; "//p[@class='currency-info-power']")

Either the latest value in the table (preferable, more accurate) or from the big field on the top left (also ok, but has less decimals information): screenshot of page

For some reason this is not loading anything. When I load the page, I notice that it takes a few seconds longer to load that part of the page. Any ideas what might be causing this and how to solve it?

I even tried importing the whole page using =IMPORTDATA(“https://rollercoin.com/network-power/btc”) but even there the price I want to import is missing, so I don't think it is an issue with the code I am using byt maybe something in the page itself blocking it?

Can someone help me get this info or understand why the code doesn't work here? If it doesn't work, how can I recognize pages where this approach does not work in the future?

Thanks

player0
  • 124,011
  • 12
  • 67
  • 124

1 Answers1

2

after you disable JavaScript there is nothing what can be scraped. you will need different site because google sheets is not able to work with JS elements

enter image description here

player0
  • 124,011
  • 12
  • 67
  • 124
  • but some info can be scrapped. when i use the =IMPORTDATA(“https://rollercoin.com/network-power/btc”) I get quite a lot of fields and info, just not the ones I currently need. that does make sense though, thanks. – user1582208 Nov 30 '21 at 14:16
  • 1
    @user1582208 with IMPORTDATA you are not rly scrapping the site itself but directly the source code of that site. nevertheless, even importdata cant read JS elements – player0 Nov 30 '21 at 14:24