I have the following function in a cell of my google doc spreadsheet:
=IMPORTXML(J15, "//meta[@name='description']/@content")
I need to capture values from the following line from this facebook page: https://www.facebook.com/pages/Christine-Simpson/135960496435727
<meta name="description" content="Christine Simpson. 68 likes · 3 talking about this. Christine Laura Simpson
is a Canadian television personality, best known as a hockey reporter,
host...">
This function works fine and has the following output into my google docs cell:
"Christine Simpson. 68 likes · 3 talking about this. Christine Laura Simpson
is a Canadian television personality, best known as a hockey reporter,
host..."
But, I need to capture only the "number of likes" from this string and the number for "talking about this" into my cell and get rid of all the other text.
I tried the following way in order to use the tokenize() function of XPATH on the returned string.
=IMPORTXML(J2, "tokenize('//meta[@name='description']/@content', '.')")
However, I get an error: "Imported XML cannot be parsed"
Any help would be appreciated.
Thx