【发布时间】:2017-12-16 15:51:42
【问题描述】:
我有两个 url,我一直在请求并使用 Bluebird Promise 库想用 Cheerio 处理 url 的 html。我似乎无法获得结果 html。我应该在内部传播中使用什么?
let url1 = request('http://example1.com')
let url2 = request('http://example2.com')
Promise.all([url1, url2])
.spread(function (url1RqRes, url2RqRes) {
// How do I get access to the response html here ???
})
.catch(function (err) {
console.log(err)
});
【问题讨论】:
标签: node.js request bluebird cheerio request-promise