2
我以Google Apps腳本編碼開始。UrlFetchApp.fetch()google.com上的不完整內容
所以,我想這個例子:fetch(url)
// The code below logs the HTML code of the Google home page.
var response = UrlFetchApp.fetch("http://www.google.com/");
Logger.log(response.getContentText());
我自收到標籤:
<!doctype html> to <style>
但有沒有這些標籤:
</head>, <body>, </body> or </html>
是它一個不正確的Google Apps腳本示例,還是我的錯誤? 如何回覆google.com上的完整HTML代碼?
substr(-1000)正常工作。謝謝。 – Benno 2014-10-17 18:22:42
@cameron Roberts。你能告訴我什麼樣的正則表達式應該用於獲得標題和URL形式content.subster(-1000)? – user1788736 2015-10-26 00:02:39