I'm attempting to scrape the number of likes for an Instagram post using the following query:
=IMPORTXML(A1, "//*[@id='react-root']/section/main/div/div/article/div[2]/section[2]/div/a/span")
where A1 is the url to any given Instagram post:
https://www.instagram.com/p/[Insert alphanumeric post ID]
However, this generates an "#N/A - content is empty" error.
I've played around with this for far too much time, but cannot get it to work! The xpath_query was generated using the dev console in Chrome. But all other variations I've tried also fail.
What am I doing wrong?