0

I am trying to retrieve in a google application script the html content of a website to extract some piece of information.

First I tried to use: var page = UrlFetchApp.fetch(modelUrl,opt).getContentText();

==> When I displayed the response with Logger.log(page) I noticed the website asking for cookies use and so I could not get the desired response.

So I analysed in firefox the cookies for this website and noticed that I should have a cookie named displd whose content is 0 to access the site content.

My question is therefore how can I perform the UrlFetchApp operation while sending this specific cookie for it to work? Would you have a code example for me?

EDIT: tried the refered approach but when I do I get absolutely nothing as a result so maybe it does not provide a way to send cookie but rather try to log in? Sincerely

rider45
  • 83
  • 4

0 Answers0