Skip to content

Commit 66f445b

Browse files
committed
feat(cleanclone): allow multiple URLs
1 parent 9b87fc1 commit 66f445b

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

packages/cleanclone/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export function argsToConfig(): CrawlConfig {
7676
.option("url", {
7777
type: "string",
7878
demandOption: true,
79-
desc: "Page URL to crawl",
79+
desc: "Page URL(s) to crawl. Can be one or more URLs separated by commas.",
8080
})
8181
.option("out-dir", {
8282
alias: "o",

packages/cleanclone/src/crawler.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ export class Crawler extends EventEmitter {
106106
await this.launchBrowser();
107107
const pageURLs = this.cfg.recursive
108108
? await this.scanSitePages(this.cfg.browserScan)
109-
: [this.cfg.url];
109+
: this.cfg.url
110+
.split(",")
111+
.map((u) => u.trim())
112+
.filter((u) => u);
110113

111114
const succURLs: string[] = [];
112115
let failedCount = 0;

0 commit comments

Comments
 (0)