0

I'm trying to import the Company Profile 'Description' from this site: https://finance.yahoo.com/quote/IVR

I made a demo sheet and all of my tries have failed (see cells D8 - E8):

=IMPORTXML("https://finance.yahoo.com/quote/IVR","//*[@id='Col2-11-QuoteModule-Proxy']/div/div/div/p")

=IMPORTXML("https://finance.yahoo.com/quote/IVR","//p[@class='businessSummary.Mt(10px).Ov(h).Tov(e)']")

Does this have to do with the div the content is in?

On the left side of the page, I was successful in pulling in the data for 52 Week Range. The formula for this is in cell G8.

I've looked at these questions on stack and they don't look like they apply:

Importxml Imported Content Empty

Import table using IMPORTXML

Any help would be much appreciated, thanks.

player0
  • 124,011
  • 12
  • 67
  • 124
moonshot
  • 649
  • 1
  • 5
  • 13

2 Answers2

2

Another option :

=IMPORTXML(B2;"substring-before(substring-after(//script[@id='fc'],'""longBusinessSummary"":""'),'"",""city""')")

YahooF

E.Wiest
  • 5,425
  • 2
  • 7
  • 12
  • ahhh got it- had to pull from script tag. Question - where is the id='fc' coming from ? That will help me identify other pieces I want to pull. thanks so much – moonshot May 03 '20 at 15:57
  • Yes, since the site relies heavily on javascript you have to pull it from there. `@id=fc` comes from the parse of the page. For example, with R, you get : https://framapic.org/KQB34BgNfnzi/VYeXuwoNLX3T.PNG You can obtain the same information with Google Sheets, but it's less convenient. – E.Wiest May 04 '20 at 10:30
0

in the meantime try:

=REGEXEXTRACT(QUERY(QUERY(ARRAY_CONSTRAIN(TRANSPOSE(
 IMPORTDATA("https://finance.yahoo.com/quote/IVR")), 2500, 60), 
 "select Col57 limit 10 offset 2021", 0),,999), "\:""(.+?)""")

enter image description here

player0
  • 124,011
  • 12
  • 67
  • 124