如何与木偶戏一起使用牛排队?

时间:2020-03-03 13:16:26

标签: javascript puppeteer

我有一些链接。我想同时访问3个链接并抓取数据。因此会一次打开3个铬标签。

现在我的问题是我在哪里使用scraperQueue.process worker。

  async naviageAndScrape() {
    this.log("naviagating single profile...");
    for (let link of this.links) {
      try {
        scraperQueue.add({ link });
        await this.scrapeActualData(link);
      } catch (err) {
        console.log(err);
      }
    }
  }

实际上正在刮擦。

   await this.navigate(link);
   await this.log("extracting public profile...");
   const profiledetails = await this.page.evaluate(this.getDetails);
   profileStore.union("profile", profiledetails);
 }

0 个答案:

没有答案