We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 803f802 + b44260c commit ae253fdCopy full SHA for ae253fd
src/main.ts
@@ -5,6 +5,8 @@ import { glob } from "glob";
5
import { config } from "../config.js";
6
import { Page } from "playwright";
7
8
+let pageCounter = 0;
9
+
10
export function getPageHtml(page: Page) {
11
return page.evaluate((selector) => {
12
const el = document.querySelector(selector) as HTMLElement | null;
@@ -30,8 +32,9 @@ if (process.env.NO_CRAWL !== "true") {
30
32
}
31
33
34
const title = await page.title();
- log.info(`Crawling ${request.loadedUrl}...`);
-
35
+ pageCounter++;
36
+ log.info(`Crawling: Page ${pageCounter} / ${config.maxPagesToCrawl} - URL: ${request.loadedUrl}...`);
37
38
await page.waitForSelector(config.selector, {
39
timeout: config.waitForSelectorTimeout ?? 1000,
40
});
0 commit comments