Need help with XpathOnURL formula

Hi all!

I'm trying to extract the number of views from the following Flickr page:
//https://www.flickr.com/photos/mynewsdesk/6343613575/

The Xpath is the following:
//*[@id="yui_3_16_0_1_1450107763755_1947"]/div[1]/div[1]/span[1]

The clostest I've gotten to making it work is to use the following formula:
=Dump(XPathOnUrl(A2;"//div[1]/div[1]/span[1]";""))

However, this makes the active cell blank and the view count appears two cells down, which prevents me from running this formula on a large number of cells.

If anyone can help me with the correct formula, I am eternally grateful :smile:

/Victor

Here is the solution:
=IFERROR(RIGHT(XPathOnUrl(A2;"//span[@class='view-count-label']");LEN(XPathOnUrl(A2;"//span[@class='view-count-label']"))-0);"")

1 Like