【发布时间】:2018-10-29 19:45:17
【问题描述】:
我在 Zapier 上使用 Javascript 步骤从 URL 中抓取 html,内容如下:
fetch('http://printatestpage.com') //example url
.then(function(res) {
return res.text();
})
.then(function(body) {
var output = {id: 1234, rawHTML: body};
callback(null, output);
})
.catch(callback);
这很好用,但是我不需要完整的 HTML 正文响应。
是否可以只输出特定的 div?例如在上面的代码中说我只想要从类 PrintButtons 输出 html 的响应?
【问题讨论】:
标签: javascript zapier