File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -171,8 +171,8 @@ def uc_open(driver, url):
171
171
and has_cf (requests_get (url ).text )
172
172
):
173
173
driver .execute_script ('window.open("%s","_blank");' % url )
174
- time . sleep (2.75 )
175
- driver .execute_script ( "window. close();" )
174
+ driver . reconnect (2.65 )
175
+ driver .close ()
176
176
driver .switch_to .window (driver .window_handles [- 1 ])
177
177
else :
178
178
driver .open (url ) # The original one
@@ -807,6 +807,7 @@ def _set_chrome_options(
807
807
)
808
808
):
809
809
chrome_options .add_argument ("--disable-popup-blocking" )
810
+ chrome_options .add_argument ("--homepage=chrome://new-tab-page/" )
810
811
# Skip remaining options that trigger anti-bot services
811
812
return chrome_options
812
813
chrome_options .add_argument ("--test-type" )
You can’t perform that action at this time.
0 commit comments