如何在人偶集群中使用 puppeteer.connect()?
How to use puppeteer.connect() in puppeteer-cluster?
我想使用远程无头浏览器服务 (this one) 并且在文档中他们使用 puppeteer.connect()
而不是 puppeteer.launch()
这是启动 puppeteer 集群的代码:
const cluster = await Cluster.launch({
concurrency: Cluster.CONCURRENCY_PAGE,
maxConcurrency: 10,
monitor: true,
options: {
timeout: 0,
}
});
如何在 puppeteer-cluster 中使用 puppeteer.connect()?
连接到已打开的 Chrome 的用例是什么?
Puppeteer-cluster 为您管理打开、关闭 worker puppeteer 浏览器的整个操作。
看我写的这个例子,语法正确,你甚至可以复制粘贴自己使用。这个问题和你的查询没有太大关系,但是代码,你想用就用,TD,作者帮我想出来的。
我想使用远程无头浏览器服务 (this one) 并且在文档中他们使用 puppeteer.connect()
而不是 puppeteer.launch()
这是启动 puppeteer 集群的代码:
const cluster = await Cluster.launch({
concurrency: Cluster.CONCURRENCY_PAGE,
maxConcurrency: 10,
monitor: true,
options: {
timeout: 0,
}
});
如何在 puppeteer-cluster 中使用 puppeteer.connect()?
连接到已打开的 Chrome 的用例是什么?
Puppeteer-cluster 为您管理打开、关闭 worker puppeteer 浏览器的整个操作。
看我写的这个例子,语法正确,你甚至可以复制粘贴自己使用。这个问题和你的查询没有太大关系,但是代码,你想用就用,TD,作者帮我想出来的。