Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix kit #1655

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Fix kit #1655

Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update patcher.py
boludoz authored Nov 13, 2023
commit 79d9b84dcb325e76549dd6a495446846147fe19e
9 changes: 3 additions & 6 deletions undetected_chromedriver/patcher.py
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ def __init__(
self,
executable_path=None,
force=False,
version_main: int = 0,
version_main=0,
user_multi_procs=False,
):
"""
@@ -63,14 +63,11 @@ def __init__(
self.user_multi_procs = user_multi_procs

try:
# Try to convert version_main into an integer
# Check if version_main is not None and can be converted to an integer
version_main_int = int(version_main)
# check if version_main_int is less than or equal to e.g 114
self.is_old_chromedriver = version_main and version_main_int <= 114
self.is_old_chromedriver = (version_main != 0) and version_main_int <= 114
except ValueError:
# If the conversion fails, print an error message
print("version_main cannot be converted to an integer")
# Set self.is_old_chromedriver to False if the conversion fails
self.is_old_chromedriver = False

# Needs to be called before self.exe_name is accessed