Skip to content

Commit 27b65d3

Browse files
authored
Merge pull request BuilderIO#50 from Umar-Azam/main
modified config.ts to fix containerized execution
2 parents 550f1e6 + 2233cbc commit 27b65d3

File tree

1 file changed

+3
-26
lines changed

1 file changed

+3
-26
lines changed

containerapp/data/config.ts

+3-26
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,8 @@
1-
import { Page } from "playwright";
1+
import { Config } from "./src/config";
22

3-
type Config = {
4-
/** URL to start the crawl */
5-
url: string;
6-
/** Pattern to match against for links on a page to subsequently crawl */
7-
match: string;
8-
/** Selector to grab the inner text from */
9-
selector: string;
10-
/** Don't crawl more than this many pages */
11-
maxPagesToCrawl: number;
12-
/** File name for the finished data */
13-
outputFileName: string;
14-
/** Optional cookie to be set. E.g. for Cookie Consent */
15-
cookie?: { name: string; value: string };
16-
/** Optional function to run for each page found */
17-
onVisitPage?: (options: {
18-
page: Page;
19-
pushData: (data: any) => Promise<void>;
20-
}) => Promise<void>;
21-
/** Optional timeout for waiting for a selector to appear */
22-
waitForSelectorTimeout?: number;
23-
};
24-
25-
export const config: Config = {
3+
export const defaultConfig: Config = {
264
url: "https://www.builder.io/c/docs/developers",
275
match: "https://www.builder.io/c/docs/**",
28-
selector: `.docs-builder-container`,
296
maxPagesToCrawl: 50,
307
outputFileName: "../data/output.json",
31-
};
8+
};

0 commit comments

Comments
 (0)