Skip to content

Commit 9903899

Browse files
committedJan 10, 2025
Update the UC Mode driver patcher
1 parent 5911c5d commit 9903899

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎seleniumbase/undetected/patcher.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def is_binary_patched(self, executable_path=None):
187187
with io.open(executable_path, "rb") as fh:
188188
if re.search(
189189
b"window.cdc_adoQpoasnfa76pfcZLmcfl_"
190-
b"(Array|Promise|Symbol|Object|Proxy|JSON)",
190+
b"(Array|Promise|Symbol|Object|Proxy|JSON|Window)",
191191
fh.read()
192192
):
193193
return False
@@ -210,14 +210,14 @@ def gen_call_function_js_cache_name(match):
210210
file_bin = fh.read()
211211
file_bin = re.sub(
212212
b"window\\.cdc_[a-zA-Z0-9]{22}_"
213-
b"(Array|Promise|Symbol|Object|Proxy|JSON)"
214-
b" = window\\.(Array|Promise|Symbol|Object|Proxy|JSON);",
213+
b"(Array|Promise|Symbol|Object|Proxy|JSON|Window) "
214+
b"= window\\.(Array|Promise|Symbol|Object|Proxy|JSON|Window);",
215215
gen_js_whitespaces,
216216
file_bin,
217217
)
218218
file_bin = re.sub(
219219
b"window\\.cdc_[a-zA-Z0-9]{22}_"
220-
b"(Array|Promise|Symbol|Object|Proxy|JSON) \\|\\|",
220+
b"(Array|Promise|Symbol|Object|Proxy|JSON|Window) \\|\\|",
221221
gen_js_whitespaces,
222222
file_bin,
223223
)

0 commit comments

Comments
 (0)
Please sign in to comment.