Google Sheets importXML not working for youtube URLs

Viewed 691

Im looking to extract the video title or video description from youtube videos in google sheets. I have the URL and when i write the importxml formula, it keeps just showing me "Share your videos with friends, family, and the world" for the description and only "Youtube" if I change it to the title. Has something changed on youtube side?

Example: =importxml(F3,"//meta[@name='description']/@content")

Cell F3 contains value: https://www.youtube.com/watch?v=cwttM41xVBY

Output from formula: Share your videos with friends, family, and the world

1 Answers

try:

=REGEXEXTRACT(QUERY(FLATTEN(IMPORTDATA(A1)), 
 "where Col1 starts with 'title:""'", 0), """(.*)""")

enter image description here

Related