Remove undetected-chromedriver from dependencies

This commit is contained in:
DevilXD committed 2023-04-23 10:06:07 +02:00
1 parent 2579301e52
commit 330eb4f184
3 files changed
+11 -6

No files matched your search

+2 -3
View File
@@ -1,8 +1,7 @@
aiohttp>2.0,<4.0 aiohttp>2.0,<4.0
Pillow Pillow
pystray pystray
selenium-wire # selenium-wire
# use a fork that has an extra option of hiding the unneeded Chrome's console cmd window # undetected-chromedriver
git+https://github.com/sebdelsol/undetected-chromedriver
# this is installed only on windows # this is installed only on windows
pywin32; sys_platform == "win32" pywin32; sys_platform == "win32"
+1
View File
@@ -12,6 +12,7 @@ if not exist "%dirpath%\env" (
) )
echo: echo:
echo Installing requirements.txt... echo Installing requirements.txt...
"%dirpath%\env\scripts\python" install -U pip
"%dirpath%\env\scripts\pip" install wheel "%dirpath%\env\scripts\pip" install wheel
"%dirpath%\env\scripts\pip" install -r "%dirpath%\requirements.txt" "%dirpath%\env\scripts\pip" install -r "%dirpath%\requirements.txt"
goto DONE goto DONE
+8 -3
View File
@@ -23,11 +23,17 @@ try:
from seleniumwire.request import Request from seleniumwire.request import Request
from selenium.common.exceptions import WebDriverException from selenium.common.exceptions import WebDriverException
from seleniumwire.undetected_chromedriver import Chrome, ChromeOptions from seleniumwire.undetected_chromedriver import Chrome, ChromeOptions
except ModuleNotFoundError:
# the dependencies weren't installed, but they're not used either, so skip them
pass
except ImportError as exc: except ImportError as exc:
if "_brotli" in exc.msg:
raise ImportError( raise ImportError(
"You need to install Visual C++ Redist (x86 and x64): " "You need to install Visual C++ Redist (x86 and x64): "
"https://support.microsoft.com/en-gb/help/2977003/the-latest-supported-visual-c-downloads" "https://support.microsoft.com/en-gb/help/2977003/"
"the-latest-supported-visual-c-downloads"
) from exc ) from exc
raise
from translate import _ from translate import _
from gui import GUIManager from gui import GUIManager
@@ -162,8 +168,6 @@ class _AuthState:
options.add_argument("--disable-web-security") options.add_argument("--disable-web-security")
options.add_argument("--allow-running-insecure-content") options.add_argument("--allow-running-insecure-content")
options.add_argument("--lang=en") options.add_argument("--lang=en")
options.add_argument("--no-sandbox")
options.add_argument("--test-type")
options.add_argument("--disable-gpu") options.add_argument("--disable-gpu")
options.set_capability("pageLoadStrategy", "eager") options.set_capability("pageLoadStrategy", "eager")
try: try:
@@ -174,6 +178,7 @@ class _AuthState:
None, None,
lambda: Chrome( lambda: Chrome(
options=options, options=options,
no_sandbox=True,
suppress_welcome=True, suppress_welcome=True,
version_main=version_main, version_main=version_main,
seleniumwire_options=wire_options, seleniumwire_options=wire_options,