如何使用 Google Apps 脚本检索 Google 站点页脚的 HTML 内容?

How to retrieve the HTML content of a Google Sites footer with a Google Apps Script?

我在 documentation an equivalent to getSummary() or getTitle() to retrieve the HTML content of a Google Sites footer 中找不到(可通过 Edit site layout > Custom Footer 编辑的自定义页脚)。

getHtmlContent()只提供主要内容 div #sites-canvas-main.

var url = 'https://sites.google.com/a/test.net/';  
var site = SitesApp.getSiteByUrl(url);
var infos = {"title": site.getTitle(), "summary": site.getSummary()};
var page = site.getChildByName("home");
var content = page.getHtmlContent();

一个解决方案使用 UrlFetchApp

function GetHtmlFooter() {
  var url = 'https://sites.google.com/a/test.net/'; 
  var content = UrlFetchApp.fetch(url).getContentText("UTF-8");
  var footer = content.match('<div class="sites-subfooter-content"><div dir="ltr">(.*)</div></div></div>')[1];
  return footer;
}