I wanted to thank everyone for being so helpful on this site - it means a lot!
I am trying to import the likes/followers from a Spotify playlist to Google Sheets. It seems like various playlists have a different XPath.
I can extract a majority(most work) of the likes/followers using this code: (B24 is the URL)
=INDEX(REGEXEXTRACT(IFERROR(QUERY(ARRAY_CONSTRAIN(IMPORTDATA(B24), 500, 5), "select Col5 where Col4 contains 'followers'", 0), QUERY(ARRAY_CONSTRAIN(IMPORTDATA(B24), 500, 7), "select Col7 where Col6 contains 'followers'", 0)), "\d+")*1)
However, some playlist links come up with an empty output. Example: https://open.spotify.com/playlist/5aSO2lT7sVPKut6F9L6IAc Example of a working one: https://open.spotify.com/playlist/7qvQVDnLe4asawpZqYhKMQ
I'm honestly not sure how to add a third argument, and I have been blindly changing the col numbers to see what works - no luck. Any idea on how to figure out what col #'s to change to/any guidance would be extremely helpful.
Thank you!!
