Search code examples
google-sheetsweb-scrapinggoogle-sheets-formulayahoo-finance

IMPORTXML Yahoo Finance not working anymore


Until a few days ago this importxml was importing the current price from yahoo finance however it's now stopped working and I can't figure out why. Is anyone able to suggest a fix? Thanks a lot.

=INDEX(IMPORTXML("https://finance.yahoo.com/quote/SGLN.L","//*[@id='quote-header-info']/div[3]/div[1]/div/span[1]"),1)

Solution

  • It seems that Yahoo changed some things in their website and it resulted to the import formula not to work anymore for some of the webpage in Yahoo Finance as well as for some tickers. This is the result of the IMPORTXML command for the SGLN.L ticker and for the AAPL ticker which is still working.

    enter image description here

    enter image description here

    For now, I suggest finding another website/data source that will give you the same information that you need for those unavailable/unscrapeable tickers. Another option would be to wait for yahoo to fix this issue.