UrlFetchApp.fetch() incomplete content on google.com

断了今生、忘了曾经 提交于 2019-12-06 10:06:11

Logger.log automatically truncates the strings displayed after a certain length. You are receiving the entire page, but only seeing the first part in the Log.

 // The code below logs the HTML code of the Google home page.
 var response = UrlFetchApp.fetch("http://www.google.com/");
 var content = response.getContentText();
 Logger.log(content);
 //log last 1000 chars of content
 Logger.log(content.substr(-1000));
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!