Skip to content

Commit 6c1c99d

Browse files
committed
Update UC Mode
1 parent 6f4059d commit 6c1c99d

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

seleniumbase/core/browser_launcher.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,10 @@ def uc_special_open_if_cf(driver, url):
183183
and has_cf(requests_get(url).text)
184184
):
185185
with driver:
186-
time.sleep(0.25)
187186
driver.execute_script('window.open("%s","_blank");' % url)
188-
driver.close()
189-
driver.switch_to.window(driver.window_handles[-1])
187+
driver.reconnect(0.555)
188+
driver.close()
189+
driver.switch_to.window(driver.window_handles[-1])
190190
else:
191191
driver.open(url) # The original one
192192
return None
@@ -195,8 +195,8 @@ def uc_special_open_if_cf(driver, url):
195195
def uc_open(driver, url):
196196
if (url.startswith("http:") or url.startswith("https:")):
197197
with driver:
198-
time.sleep(0.25)
199198
driver.open(url)
199+
time.sleep(0.25)
200200
else:
201201
driver.open(url) # The original one
202202
return None
@@ -205,10 +205,10 @@ def uc_open(driver, url):
205205
def uc_open_with_tab(driver, url):
206206
if (url.startswith("http:") or url.startswith("https:")):
207207
with driver:
208-
time.sleep(0.25)
209208
driver.execute_script('window.open("%s","_blank");' % url)
210209
driver.close()
211210
driver.switch_to.window(driver.window_handles[-1])
211+
time.sleep(0.25)
212212
else:
213213
driver.open(url) # The original one
214214
return None

seleniumbase/undetected/patcher.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,6 @@ def gen_call_function_js_cache_name(match):
208208
gen_js_whitespaces,
209209
file_bin,
210210
)
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-
)
216211
file_bin = re.sub(
217212
b"'\\$cdc_[a-zA-Z0-9]{22}_';",
218213
gen_call_function_js_cache_name,

0 commit comments

Comments
 (0)