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