Skip to content

Commit

Permalink
config.ts.example added
Browse files Browse the repository at this point in the history
  • Loading branch information
hirsaeki committed Mar 27, 2024
1 parent f07e86f commit 33b9330
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ storage
*.json
.env
pnpm-lock.yaml

# exclude working files
/gpt-crawler-y-upstream_project_summary.*
/config.ts
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 20.10.0
5 changes: 2 additions & 3 deletions config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ export const defaultConfig: Config = {
// url: "https://www.builder.io/c/docs/developers",
// match: "https://www.builder.io/c/docs/**",
url: "https://help.mypurecloud.com/articles/about-cx-cloud-from-genesys-and-salesforce/",
match: "https://help.mypurecloud.com/?p**",
maxPagesToCrawl: 100,
match: ["https://help.mypurecloud.com/?p**","https://help.salesforce.com/**"],
maxPagesToCrawl: 300,
// outputFileName: "output.json",
outputFileName: "cxcloud.json",
waitTime: 1000,
Expand All @@ -17,5 +17,4 @@ export const defaultConfig: Config = {
// userAgent: "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
maxTokens: 2000000,
selector: "#main-content > div",
crawlInsideSelector: true,
};
17 changes: 17 additions & 0 deletions config.ts.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Config } from "./src/config";

export const defaultConfig: Config = {
url: "https://www.builder.io/c/docs/developers",
match: "https://www.builder.io/c/docs/**",
maxPagesToCrawl: 300,
outputFileName: "output.json",
waitTime: 1000,
onVisitPage: async ({ visitPageWaitTime }) => {
await new Promise((resolve) =>
setTimeout(resolve, visitPageWaitTime ?? 1000),
);
},
// userAgent: "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
maxTokens: 2000000,
selector: "#main-content > div",
};

0 comments on commit 33b9330

Please sign in to comment.