File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -594,7 +594,7 @@ export class Crawler {
594594 }
595595
596596 extraChromeArgs ( ) {
597- const args = [ ] ;
597+ const args : string [ ] = [ ] ;
598598 if ( this . params . lang ) {
599599 if ( this . params . profile ) {
600600 logger . warn (
@@ -605,6 +605,16 @@ export class Crawler {
605605 args . push ( `--accept-lang=${ this . params . lang } ` ) ;
606606 }
607607 }
608+
609+ const extra = this . params . extraChromeArgs ;
610+ if ( Array . isArray ( extra ) && extra . length > 0 ) {
611+ for ( const v of extra ) {
612+ if ( v !== undefined && v !== null && v !== "" ) {
613+ args . push ( String ( v ) ) ;
614+ }
615+ }
616+ }
617+
608618 return args ;
609619 }
610620
Original file line number Diff line number Diff line change @@ -683,6 +683,13 @@ class ArgParser {
683683 "path to SSH known hosts file for SOCKS5 over SSH proxy connection" ,
684684 type : "string" ,
685685 } ,
686+
687+ extraChromeArgs : {
688+ describe :
689+ "Extra arguments to pass directly to the Chrome instance (space-separated or multiple --extraChromeArgs)" ,
690+ type : "array" ,
691+ default : [ ] ,
692+ } ,
686693 } ) ;
687694 }
688695
You can’t perform that action at this time.
0 commit comments