1

Here is the formula:

=ImportXML("http://www.bloomberg.com/quote/7501:JP", "//div[@class='price-container down']//div[@class='price']")

As of several days ago, this formula stopped working. Why could this happen?

1

Something went wrong on Google's side, apparently. Other stock symbols import correctly. My uneducated guess is that there was a transmission error and a corrupted fetch result got stuck in Google's cache. I was able to break the cache by adding a redundant URL parameter: http://www.bloomberg.com/quote/7501:JP?param=1 fetched correctly.

By the way, the selector @class='price-container down' will only fetch the price if it's going down, because otherwise the classes will be price-contained up. To fetch the data in either case, use contains(@class,'price-container') instead:

=ImportXML("http://www.bloomberg.com/quote/7501:JP?param=1", "//div[contains(@class,'price-container')]//div[@class='price']")
  • I appreciate this elegant solution, but still get the error message: "Could not fetch URL: bloomberg.com/quote/7501:JP?param=1" – user115083 Feb 14 '16 at 16:38
  • Indeed, now it doesn't work for me either. – user79865 Feb 14 '16 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.