Remove undetected-chromedriver from dependencies
This commit is contained in:
1 parent
2579301e52
commit
330eb4f184
3 files changed
+14
-9
No files matched your search
+2
-3
@@ -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"
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -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:
|
||||||
raise ImportError(
|
if "_brotli" in exc.msg:
|
||||||
"You need to install Visual C++ Redist (x86 and x64): "
|
raise ImportError(
|
||||||
"https://support.microsoft.com/en-gb/help/2977003/the-latest-supported-visual-c-downloads"
|
"You need to install Visual C++ Redist (x86 and x64): "
|
||||||
) from exc
|
"https://support.microsoft.com/en-gb/help/2977003/"
|
||||||
|
"the-latest-supported-visual-c-downloads"
|
||||||
|
) 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,
|
||||||
|
|||||||
Reference in new issue
Block a user