File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -192,14 +192,16 @@ def suffix_conversion(suff="cpp"):
192
192
password = conf ["Password" ]
193
193
outputDir = conf ["OutputDir" ]
194
194
driverPath = conf ["ChromedriverPath" ]
195
+ headless = conf ["Headless" ]
195
196
196
197
if not os .path .isdir (outputDir ):
197
198
print ("Output directory not found" )
198
199
sys .exit (1 )
199
200
200
201
chrome_options = Options ()
201
- chrome_options .add_argument ('--headless' )
202
- chrome_options .add_argument ('--log-level=3' )
202
+ if headless == True :
203
+ chrome_options .add_argument ('--headless' )
204
+ chrome_options .add_argument ('--log-level=3' )
203
205
driver = webdriver .Chrome (driverPath , chrome_options = chrome_options )
204
206
205
207
login ()
Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ You have to modify variables in `conf.json`.
22
22
"Username" : " YOUR_USERNAME" ,
23
23
"Password" : " YOUR_PASSWORD" ,
24
24
"OutputDir" : " THE_ABSOLUTE_PATH_THAT_YOU_WANT_TO_SAVE_FILES" ,
25
- "ChromedriverPath" : " THE_ABSOLUTE_PATH_OF_CHROMEDRIVER"
25
+ "ChromedriverPath" : " THE_ABSOLUTE_PATH_OF_CHROMEDRIVER" ,
26
+ "Headless" : true
26
27
}
27
28
```
28
29
Original file line number Diff line number Diff line change 2
2
"Username" : " YOUR_USERNAME" ,
3
3
"Password" : " YOUR_PASSWORD" ,
4
4
"OutputDir" : " THE_ABSOLUTE_PATH_THAT_YOU_WANT_TO_SAVE_FILES" ,
5
- "ChromedriverPath" : " THE_ABSOLUTE_PATH_OF_CHROMEDRIVER"
5
+ "ChromedriverPath" : " THE_ABSOLUTE_PATH_OF_CHROMEDRIVER" ,
6
+ "Headless" : true
6
7
}
You can’t perform that action at this time.
0 commit comments