I am trying to fetch the HTML code of different youtube video in Google appscript using urlfetchapp. Command is below -
var response1 = UrlFetchApp.fetch("https://www.youtube.com/watch?v=JeDZwebDRkU");
But everytime I am running the command instead of getting the respective video's HTML, I am getting the home page HTML. Is there a way I can pull the source code which I am seeing from the actual video link?
Tried with multiple links but the HTML response was pretty much same except for 1 argument changing with the link I am using. The actual output expected is same to when I go to see the source code from any browser