0
votes

I am trying to scrape content from tradingview website. Specifically the Industry of a particular ticker given in the description.

Description of ticker

I have the xpath which I copied from the element inspector of the browser. But it doesn't seem to work and the output I get is "#N/A".

The formula I have used is

=IMPORTXML("https://www.tradingview.com/symbols/NSE-FINPIPE/", "//div[3]/div[3]/div/div[2]/div/div/div[1]/div[3]/div/div[2]/div/div[1]/div[2]/div[2]/a")
1

1 Answers

0
votes

IMPORTXML as well as IMPORTHMTL they can only see the source code, not the DOM shown on the web browser developer console.

If the the content that you want to scrape is added to the DOM by client-side JavaScript or the web browser engine, it can't be scrapped by using IMPORTXML.