0

When I am using "Google App Script" in order to retrieve a json page, I face with the following message: Please turn JavaScript on and reload the page.

I am not sure how to handle this, hence I can open the same page on my web-browser.

[Q] How could I fix this in order retrieve json-page's information only using "Google App Script"?

function getJsonFromUrl(strUrl) {
  let _options = {
    method: 'GET',
    muteHttpExceptions: true,
    contentType: 'application/json',
  };
  let _res = UrlFetchApp.fetch(strUrl, _options);
  Logger.log(_res.getContentText());
  return JSON.parse(_res.getContentText());
}
5
  • Does this answer your question? Using Apps Script to scrape javascript rendered web page Commented Jan 30, 2022 at 11:31
  • no, google app script seems cannot use puppeteer Commented Jan 30, 2022 at 13:51
  • There is no other way, of course if you have time to explain to Google why this is important feature, you can try create feature request here: issuetracker.google.com Commented Jan 30, 2022 at 14:01
  • To what link are you executing the fetch? is it a javascript page? Commented Jan 31, 2022 at 13:20
  • When you track the network traffic, you will know the issue Commented Feb 2, 2022 at 2:22

1 Answer 1

0

As mentioned in the comment #3 and verified with the URL provided:

There is no other way, of course if you have time to explain to Google why this is important feature, you can try create feature request here: issuetracker.google.com

You can use the following template to create the feature request:

Sign up to request clarification or add additional context in comments.

1 Comment

yes, so sad. and will use your answer as the solution I fix it by develop my own chromium-driver and host in cloud

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.