File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -183,10 +183,11 @@ def uc_special_open_if_cf(driver, url):
183
183
and has_cf (requests_get (url ).text )
184
184
):
185
185
with driver :
186
+ time .sleep (0.25 )
186
187
driver .execute_script ('window.open("%s","_blank");' % url )
187
- driver .reconnect ( 0.555 )
188
- driver .close ( )
189
- driver . switch_to . window ( driver . window_handles [ - 1 ] )
188
+ driver .close ( )
189
+ driver .switch_to . window ( driver . window_handles [ - 1 ] )
190
+ time . sleep ( 0.11 )
190
191
else :
191
192
driver .open (url ) # The original one
192
193
return None
@@ -195,8 +196,9 @@ def uc_special_open_if_cf(driver, url):
195
196
def uc_open (driver , url ):
196
197
if (url .startswith ("http:" ) or url .startswith ("https:" )):
197
198
with driver :
198
- driver .open (url )
199
199
time .sleep (0.25 )
200
+ driver .open (url )
201
+ time .sleep (0.11 )
200
202
else :
201
203
driver .open (url ) # The original one
202
204
return None
@@ -205,10 +207,11 @@ def uc_open(driver, url):
205
207
def uc_open_with_tab (driver , url ):
206
208
if (url .startswith ("http:" ) or url .startswith ("https:" )):
207
209
with driver :
210
+ time .sleep (0.25 )
208
211
driver .execute_script ('window.open("%s","_blank");' % url )
209
212
driver .close ()
210
213
driver .switch_to .window (driver .window_handles [- 1 ])
211
- time .sleep (0.25 )
214
+ time .sleep (0.11 )
212
215
else :
213
216
driver .open (url ) # The original one
214
217
return None
Original file line number Diff line number Diff line change @@ -208,6 +208,11 @@ def gen_call_function_js_cache_name(match):
208
208
gen_js_whitespaces ,
209
209
file_bin ,
210
210
)
211
+ file_bin = re .sub (
212
+ b"window\\ .cdc_[a-zA-Z0-9]{22}_(Array|Promise|Symbol)" ,
213
+ b"window\\ .ccd_adoQpoasnaf67pfcZLmcfl_(Array|Promise|Symbol)" ,
214
+ file_bin ,
215
+ )
211
216
file_bin = re .sub (
212
217
b"'\\ $cdc_[a-zA-Z0-9]{22}_';" ,
213
218
gen_call_function_js_cache_name ,
You can’t perform that action at this time.
0 commit comments