Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/crawler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ export class Crawler {
}

extraChromeArgs() {
const args = [];
const args: string[] = [];
if (this.params.lang) {
if (this.params.profile) {
logger.warn(
Expand All @@ -605,6 +605,16 @@ export class Crawler {
args.push(`--accept-lang=${this.params.lang}`);
}
}

const extra = this.params.extraChromeArgs;
if (Array.isArray(extra) && extra.length > 0) {
for (const v of extra) {
if (v) {
args.push(String(v));
}
}
}

return args;
}

Expand Down
7 changes: 7 additions & 0 deletions src/util/argParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,13 @@ class ArgParser {
"path to SSH known hosts file for SOCKS5 over SSH proxy connection",
type: "string",
},

extraChromeArgs: {
describe:
"Extra arguments to pass directly to the Chrome instance (space-separated or multiple --extraChromeArgs)",
type: "array",
default: [],
},
});
}

Expand Down
Loading