<pre style='margin:0'>
Renee Otten (reneeotten) pushed a commit to branch master
in repository macports-ports.

</pre>
<p><a href="https://github.com/macports/macports-ports/commit/cf44a19f0f980569f6772591a8555cdec2b7538e">https://github.com/macports/macports-ports/commit/cf44a19f0f980569f6772591a8555cdec2b7538e</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit cf44a19f0f980569f6772591a8555cdec2b7538e
</span>Author: Steven Thomas Smith <s.t.smith@ieee.org>
AuthorDate: Wed Feb 15 19:20:38 2023 -0500

<span style='display:block; white-space:pre;color:#404040;'>    py-undetected-chromedriver: Update to version 3.4.6
</span>---
 python/py-undetected-chromedriver/Portfile         | 61 +++++++++--------
 .../patch-undetected_chromedriver-__init__-py.diff | 54 ---------------
 .../patch-undetected_chromedriver-patcher-py.diff  | 80 ----------------------
 .../files/patch-undetected_chromedriver.diff       | 35 ++++++++++
 4 files changed, 66 insertions(+), 164 deletions(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-undetected-chromedriver/Portfile b/python/py-undetected-chromedriver/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index fbf5cb64d37..742c94abe27 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/python/py-undetected-chromedriver/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-undetected-chromedriver/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4,8 +4,8 @@ PortSystem          1.0
</span> PortGroup           python 1.0
 
 name                py-undetected-chromedriver
<span style='display:block; white-space:pre;background:#ffe0e0;'>-version             3.1.5.post4
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-revision            1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version             3.4.6
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision            0
</span> categories-append   python www
 maintainers         nomaintainer
 license             GPL-3
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -19,9 +19,9 @@ long_description    {*}${description} | Zero-Config | \
</span> 
 homepage            https://github.com/ultrafunkamsterdam/undetected-chromedriver
 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-checksums           rmd160  03d5e7ee83c0fdfad14239c9253072e802683ddb \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                    sha256  cfd77c38d86825f2f2b5ab296bf7814ef8f7199c3d9f46f24e57b93ea1662223 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                    size    55680
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums           rmd160  3b247c010d8df8141dd5aab082b540996c92ab23 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                    sha256  871485624f7a2e1c15fde75ab7b8ceb30ebc06dad90cd66173ea8036c046367f \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                    size    61342
</span> 
 python.versions     37 38 39 310
 
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -34,6 +34,10 @@ if {${name} ne ${subport}} {
</span>                     port:py${python.version}-selenium \
                     port:py${python.version}-websockets
 
<span style='display:block; white-space:pre;background:#e0ffe0;'>+    # diff -Naurd ./uc-orig ./uc-new | sed -E -e 's/\.\/uc-(orig|new)\//.\//g' | sed -E -e 's|/opt/local|@PREFIX@|g' > ~/Downloads/patch-undetected_chromedriver.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    patchfiles-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                    patch-undetected_chromedriver.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span>     post-patch {
         fs-traverse f ${worksrcpath}/undetected_chromedriver {
             if {[file isfile ${f}] && [string match "*.py" ${f}]} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -44,41 +48,38 @@ if {${name} ne ${subport}} {
</span>         }
     }
 
<span style='display:block; white-space:pre;background:#e0ffe0;'>+    pre-test {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        copy        ${filespath}/uc-test.py ${workpath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        reinplace -E -q \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            "1s|^(#!\[\[:space:]]*)/usr/bin/env\[\[:space:]]+python3|\\1${python.bin}|" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                    ${workpath}/uc-test.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        reinplace -q "s|@PREFIX@|${prefix}|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                    ${workpath}/uc-test.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        reinplace -q "s|@NAME@|chromedriver|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                    ${workpath}/uc-test.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span>     test.run        yes
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    test.target     tests/v2/test_uc.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    test.env        PYTHONPATH=${worksrcpath}/build/lib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    test.cmd        ${python.bin}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    test.target     ${workpath}/uc-test.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    test.args
</span> }
 
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# Obsolete Date: 2024-01-01
</span> variant port_chromedriver_binary \
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    description {Patch the chromedriver port binary.} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    if {${name} ne ${subport}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-        # diff -Naurd ./uc-orig/undetected_chromedriver/__init__.py ./uc-new/undetected_chromedriver/__init__.py | sed -E -e 's/\.\/uc-(orig|new)\//.\//g' | sed -E -e 's|/opt/local|@PREFIX@|g' > ~/Downloads/patch-undetected_chromedriver-__init__-py.diff
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-        patchfiles-append \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                    patch-undetected_chromedriver-__init__-py.diff \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                    patch-undetected_chromedriver-patcher-py.diff
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-        post-patch {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-            reinplace "s|@PREFIX@|${prefix}|g" \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                    ${worksrcpath}/undetected_chromedriver/__init__.py
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-            reinplace "s|@NAME@|chromedriver|g" \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                    ${worksrcpath}/undetected_chromedriver/__init__.py
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-        }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    description {This variant is deprecated.} { 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    return -code error "deprecated variant."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span> 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    notes-append \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-        "This package is intended to be used with the port
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+notes-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    "This package is intended to be used with the port
</span> 
     chromedriver +undetected
 
 and the Python code:
 
     import undetected_chromedriver as uc
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    driver = uc.Chrome()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-To use separate chromedriver binaries with distinct signatures, use:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    driver = uc.Chrome(executable_path='${prefix}/bin/chromedriver-original', executable_path_mkdtemp=True)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    driver.delete_executable_path_mkdtemp()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    driver = uc.Chrome(driver_executable_path='${prefix}/bin/chromedriver-undetected')
</span> "
<span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span> 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-default_variants-append \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                    +port_chromedriver_binary
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-undetected-chromedriver/files/patch-undetected_chromedriver-__init__-py.diff b/python/py-undetected-chromedriver/files/patch-undetected_chromedriver-__init__-py.diff
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 5b86014a48e..00000000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/python/py-undetected-chromedriver/files/patch-undetected_chromedriver-__init__-py.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,54 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- ./undetected_chromedriver/__init__.py  2022-07-08 13:23:11.000000000 -0400
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ ./undetected_chromedriver/__init__.py  2022-07-08 13:35:40.000000000 -0400
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -118,6 +118,8 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         patcher_force_close=False,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         suppress_welcome=True,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         use_subprocess=False,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+        executable_path='@PREFIX@/bin/@NAME@',
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+        executable_path_mkdtemp=False,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         debug=False,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         **kw
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-     ):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -223,14 +225,28 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-               in that case you can set this to `True`. The browser will start via subprocess, and will keep running most of times.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-               ! setting it to True comes with NO support when being detected. !
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+        executable_path: str, optional, default: '@PREFIX@/bin/@NAME@'
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+            a full file path to the patched chromedriver executable.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+        executable_path_mkdtemp: bool or str, optional, default: False
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+            Make a temporary directory, copy `chromedriver` there from
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+            `executable_path`, and patch the executable. The user must
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+            delete this `chromedriver` copy and temporary path with the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+            method `delete_executable_path_mkdtemp`.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         """
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         self.debug = debug
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         patcher = Patcher(
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--            executable_path=driver_executable_path,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+            executable_path=executable_path,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+            executable_path_mkdtemp=executable_path_mkdtemp,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-             force=patcher_force_close,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-             version_main=version_main,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         )
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         patcher.auto()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+        if hasattr(patcher, 'executable_path_mkdtemp') \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+           and patcher.executable_path_mkdtemp \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+           and isinstance(patcher.executable_path_mkdtemp, str):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+            self.executable_path_mkdtemp = patcher.executable_path_mkdtemp
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         self.patcher = patcher
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         if not options:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-             options = ChromeOptions()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -655,6 +671,12 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-     def __hash__(self):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         return hash(self.options.debugger_address)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+    def delete_executable_path_mkdtemp(self):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+        if hasattr(self, 'executable_path_mkdtemp') \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+           and self.executable_path_mkdtemp \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+           and isinstance(self.executable_path_mkdtemp, str):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+            os.unlink(self.executable_path_mkdtemp)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+            os.rmdir(os.path.dirname(self.executable_path_mkdtemp))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- def find_chrome_executable():
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-     """
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-undetected-chromedriver/files/patch-undetected_chromedriver-patcher-py.diff b/python/py-undetected-chromedriver/files/patch-undetected_chromedriver-patcher-py.diff
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index cd9c6703eea..00000000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/python/py-undetected-chromedriver/files/patch-undetected_chromedriver-patcher-py.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,80 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- ./undetected_chromedriver/patcher.py   2022-07-08 13:40:29.000000000 -0400
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ ./undetected_chromedriver/patcher.py   2022-07-08 13:49:36.000000000 -0400
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -6,8 +6,10 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- import os
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- import random
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- import re
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+import shutil
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- import string
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- import sys
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+import tempfile
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- import time
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- import zipfile
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- from distutils.version import LooseVersion
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -46,12 +48,15 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         d = "~/.undetected_chromedriver"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-     data_path = os.path.abspath(os.path.expanduser(d))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--    def __init__(self, executable_path=None, force=False, version_main: int = 0):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+    def __init__(self, executable_path=None, executable_path_mkdtemp=False, force=False, version_main: int = 0):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         """
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         Args:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-             executable_path: None = automatic
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                              a full file path to the chromedriver executable
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+            executable_path_mkdtemp: bool or str, optional, default: False
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+                Make a temporary directory, copy `chromedriver` there from
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+                `executable_path`, and patch the executable.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-             force: False
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                     terminate processes which are holding lock
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-             version_main: 0 = auto
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -87,16 +92,29 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         if executable_path:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-             self._custom_exe_path = True
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-             self.executable_path = executable_path
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+            if executable_path_mkdtemp:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+                self.executable_path_mkdtemp = executable_path_mkdtemp \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+                    if isinstance(executable_path_mkdtemp, str) \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+                       else os.path.join(tempfile.mkdtemp(), self.exe_name)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         self.version_main = version_main
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         self.version_full = None
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--    def auto(self, executable_path=None, force=False, version_main=None):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+    def auto(self, executable_path=None, executable_path_mkdtemp=False, force=False, version_main=None):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         """"""
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         if executable_path:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-             self.executable_path = executable_path
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-             self._custom_exe_path = True
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+            if executable_path_mkdtemp:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+                self.executable_path_mkdtemp = executable_path_mkdtemp \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+                    if isinstance(executable_path_mkdtemp, str) \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+                       else os.path.join(tempfile.mkdtemp(), self.exe_name)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         if self._custom_exe_path:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+            if hasattr(self, 'executable_path_mkdtemp') \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+               and self.executable_path_mkdtemp \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+               and isinstance(self.executable_path_mkdtemp, str):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+                shutil.copy(self.executable_path, self.executable_path_mkdtemp)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+                self.executable_path = self.executable_path_mkdtemp
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-             ispatched = self.is_binary_patched(self.executable_path)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-             if not ispatched:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                 return self.patch_exe()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -203,10 +221,14 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-     @staticmethod
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-     def gen_random_cdc():
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--        cdc = random.choices(string.ascii_lowercase, k=26)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--        cdc[-6:-4] = map(str.upper, cdc[-6:-4])
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--        cdc[2] = cdc[0]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--        cdc[3] = "_"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+        """Generate a length 26 random bytestring that doesn't start with 'cdc_'."""
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+        while True:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+            cdc = random.choices(string.ascii_lowercase, k=26)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+            if cdc[0] == 'c' and cdc[1] == 'd': continue
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+            cdc[-6:-4] = map(str.upper, cdc[-6:-4])
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+            cdc[2] = cdc[0]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+            cdc[3] = "_"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+            break
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-         return "".join(cdc).encode()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- 
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-     def is_binary_patched(self, executable_path=None):
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/python/py-undetected-chromedriver/files/patch-undetected_chromedriver.diff b/python/py-undetected-chromedriver/files/patch-undetected_chromedriver.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..a04dca9d41f
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/python/py-undetected-chromedriver/files/patch-undetected_chromedriver.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,35 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff -Naurd ./undetected_chromedriver/patcher.py ./undetected_chromedriver/patcher.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ./undetected_chromedriver/patcher.py   2023-02-15 16:55:09
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ./undetected_chromedriver/patcher.py   2023-02-15 17:09:23
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -8,6 +8,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ import random
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ import re
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ import string
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++import subprocess
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ import sys
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ import time
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ from urllib.request import urlopen
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -19,6 +20,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IS_POSIX = sys.platform.startswith(("darwin", "cygwin", "linux", "linux2"))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++chromedriver_version_reprog = re.compile(r'ChromeDriver +(\d+)(.\d+)* +.*')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ class Patcher(object):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+     url_repo = "https://chromedriver.storage.googleapis.com"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -85,6 +87,15 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         if executable_path:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+             self._custom_exe_path = True
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+             self.executable_path = executable_path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++            try:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++                version_main = int(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++                    chromedriver_version_reprog.sub('\\1',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++                        subprocess.run([self.executable_path, '--version'],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++                            stdout=subprocess.PIPE).stdout.decode('ascii').strip()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++                    )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++                )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++            except Exception as e:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++                print(e)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         self.version_main = version_main
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+         self.version_full = None
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 
</span></pre><pre style='margin:0'>

</pre>