seleniumbase 4.34.9__py3-none-any.whl → 4.34.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- seleniumbase/__version__.py +1 -1
- seleniumbase/config/proxy_list.py +2 -2
- seleniumbase/core/detect_b_ver.py +12 -13
- seleniumbase/core/proxy_helper.py +1 -1
- seleniumbase/undetected/__init__.py +3 -3
- seleniumbase/undetected/cdp_driver/browser.py +5 -4
- seleniumbase/undetected/cdp_driver/cdp_util.py +9 -0
- {seleniumbase-4.34.9.dist-info → seleniumbase-4.34.11.dist-info}/METADATA +1 -1
- {seleniumbase-4.34.9.dist-info → seleniumbase-4.34.11.dist-info}/RECORD +13 -13
- {seleniumbase-4.34.9.dist-info → seleniumbase-4.34.11.dist-info}/LICENSE +0 -0
- {seleniumbase-4.34.9.dist-info → seleniumbase-4.34.11.dist-info}/WHEEL +0 -0
- {seleniumbase-4.34.9.dist-info → seleniumbase-4.34.11.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.34.9.dist-info → seleniumbase-4.34.11.dist-info}/top_level.txt +0 -0
seleniumbase/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
# seleniumbase package
|
2
|
-
__version__ = "4.34.
|
2
|
+
__version__ = "4.34.11"
|
@@ -23,8 +23,8 @@ you can try finding one from one of following sites:
|
|
23
23
|
"""
|
24
24
|
|
25
25
|
PROXY_LIST = {
|
26
|
-
"example1": "
|
27
|
-
"example2": "
|
26
|
+
"example1": "98.8.195.160:443", # (Example) - set your own proxy here
|
27
|
+
"example2": "200.174.198.86:8888", # (Example)
|
28
28
|
"example3": "socks5://184.178.172.5:15303", # (Example)
|
29
29
|
"proxy1": None,
|
30
30
|
"proxy2": None,
|
@@ -96,14 +96,9 @@ def linux_browser_apps_to_cmd(*apps):
|
|
96
96
|
)
|
97
97
|
|
98
98
|
|
99
|
-
def chrome_on_linux_path(
|
99
|
+
def chrome_on_linux_path(chromium_ok=False):
|
100
100
|
if os_name() != OSType.LINUX:
|
101
101
|
return ""
|
102
|
-
if prefer_chromium:
|
103
|
-
paths = ["/bin/chromium", "/bin/chromium-browser"]
|
104
|
-
for path in paths:
|
105
|
-
if os.path.exists(path) and os.access(path, os.X_OK):
|
106
|
-
return path
|
107
102
|
paths = ["/bin/google-chrome", "/bin/google-chrome-stable"]
|
108
103
|
for path in paths:
|
109
104
|
if os.path.exists(path) and os.access(path, os.X_OK):
|
@@ -112,17 +107,22 @@ def chrome_on_linux_path(prefer_chromium=False):
|
|
112
107
|
binaries = []
|
113
108
|
binaries.append("google-chrome")
|
114
109
|
binaries.append("google-chrome-stable")
|
115
|
-
binaries.append("chrome")
|
116
|
-
binaries.append("chromium")
|
117
|
-
binaries.append("chromium-browser")
|
118
110
|
binaries.append("google-chrome-beta")
|
119
111
|
binaries.append("google-chrome-dev")
|
120
112
|
binaries.append("google-chrome-unstable")
|
113
|
+
binaries.append("chrome")
|
114
|
+
binaries.append("chromium")
|
115
|
+
binaries.append("chromium-browser")
|
121
116
|
for binary in binaries:
|
122
117
|
for path in paths:
|
123
118
|
full_path = os.path.join(path, binary)
|
124
119
|
if os.path.exists(full_path) and os.access(full_path, os.X_OK):
|
125
120
|
return full_path
|
121
|
+
if chromium_ok:
|
122
|
+
paths = ["/bin/chromium", "/bin/chromium-browser"]
|
123
|
+
for path in paths:
|
124
|
+
if os.path.exists(path) and os.access(path, os.X_OK):
|
125
|
+
return path
|
126
126
|
return "/usr/bin/google-chrome"
|
127
127
|
|
128
128
|
|
@@ -209,12 +209,11 @@ def windows_browser_apps_to_cmd(*apps):
|
|
209
209
|
return '%s -NoProfile "%s"' % (powershell, script)
|
210
210
|
|
211
211
|
|
212
|
-
def get_binary_location(browser_type,
|
213
|
-
"""Return the full path of the browser binary.
|
214
|
-
If going for better results in UC Mode, use: prefer_chromium=True"""
|
212
|
+
def get_binary_location(browser_type, chromium_ok=False):
|
213
|
+
"""Return the full path of the browser binary."""
|
215
214
|
cmd_mapping = {
|
216
215
|
ChromeType.GOOGLE: {
|
217
|
-
OSType.LINUX: chrome_on_linux_path(
|
216
|
+
OSType.LINUX: chrome_on_linux_path(chromium_ok),
|
218
217
|
OSType.MAC: r"/Applications/Google Chrome.app"
|
219
218
|
r"/Contents/MacOS/Google Chrome",
|
220
219
|
OSType.WIN: chrome_on_windows_path(),
|
@@ -40,7 +40,7 @@ def create_proxy_ext(
|
|
40
40
|
""" mode: "fixed_servers",\n"""
|
41
41
|
""" rules: {\n"""
|
42
42
|
""" singleProxy: {\n"""
|
43
|
-
""" scheme: "http",\n"""
|
43
|
+
""" scheme: ["http", "https", "socks4", "socks5"],\n"""
|
44
44
|
""" host: "%s",\n"""
|
45
45
|
""" port: parseInt("%s")\n"""
|
46
46
|
""" },\n"""
|
@@ -586,14 +586,14 @@ def find_chrome_executable():
|
|
586
586
|
if IS_POSIX:
|
587
587
|
for item in os.environ.get("PATH").split(os.pathsep):
|
588
588
|
for subitem in (
|
589
|
-
"chromium",
|
590
589
|
"google-chrome",
|
591
|
-
"chromium-browser",
|
592
|
-
"chrome",
|
593
590
|
"google-chrome-stable",
|
594
591
|
"google-chrome-beta",
|
595
592
|
"google-chrome-dev",
|
596
593
|
"google-chrome-unstable",
|
594
|
+
"chrome",
|
595
|
+
"chromium",
|
596
|
+
"chromium-browser",
|
597
597
|
):
|
598
598
|
candidates.add(os.sep.join((item, subitem)))
|
599
599
|
if "darwin" in sys.platform:
|
@@ -565,10 +565,11 @@ class Browser:
|
|
565
565
|
# asyncio.get_running_loop().create_task(
|
566
566
|
# self.connection.send(cdp.browser.close())
|
567
567
|
# )
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
568
|
+
if self.connection:
|
569
|
+
asyncio.get_event_loop().create_task(self.connection.aclose())
|
570
|
+
logger.debug(
|
571
|
+
"Closed connection using get_event_loop().create_task()"
|
572
|
+
)
|
572
573
|
except RuntimeError:
|
573
574
|
if self.connection:
|
574
575
|
try:
|
@@ -10,6 +10,7 @@ import typing
|
|
10
10
|
from contextlib import suppress
|
11
11
|
from seleniumbase import config as sb_config
|
12
12
|
from seleniumbase.config import settings
|
13
|
+
from seleniumbase.core import detect_b_ver
|
13
14
|
from seleniumbase.fixtures import constants
|
14
15
|
from seleniumbase.fixtures import shared_utils
|
15
16
|
from typing import Optional, List, Union, Callable
|
@@ -226,6 +227,10 @@ async def start_async(*args, **kwargs) -> Browser:
|
|
226
227
|
binary_location = None
|
227
228
|
if "browser_executable_path" in kwargs:
|
228
229
|
binary_location = kwargs["browser_executable_path"]
|
230
|
+
else:
|
231
|
+
binary_location = detect_b_ver.get_binary_location("google-chrome")
|
232
|
+
if binary_location and not os.path.exists(binary_location):
|
233
|
+
binary_location = None
|
229
234
|
if (
|
230
235
|
shared_utils.is_chrome_130_or_newer(binary_location)
|
231
236
|
and "user_data_dir" in kwargs
|
@@ -261,6 +266,10 @@ def start_sync(*args, **kwargs) -> Browser:
|
|
261
266
|
binary_location = None
|
262
267
|
if "browser_executable_path" in kwargs:
|
263
268
|
binary_location = kwargs["browser_executable_path"]
|
269
|
+
else:
|
270
|
+
binary_location = detect_b_ver.get_binary_location("google-chrome")
|
271
|
+
if binary_location and not os.path.exists(binary_location):
|
272
|
+
binary_location = None
|
264
273
|
if (
|
265
274
|
shared_utils.is_chrome_130_or_newer(binary_location)
|
266
275
|
and "user_data_dir" in kwargs
|
@@ -3,7 +3,7 @@ sbase/__main__.py,sha256=G0bVB1-DM4PGwQ1KyOupaWCs4ePbChZNNWuX2htim5U,647
|
|
3
3
|
sbase/steps.py,sha256=_WvAjydKqZfTdnZW9LPKkRty-g-lfdUPmLqnZj6ulcs,43013
|
4
4
|
seleniumbase/__init__.py,sha256=OtJh8nGKL4xtZpw8KPqmn7Q6R-86t4cWUDyVF5MbMTo,2398
|
5
5
|
seleniumbase/__main__.py,sha256=dn1p6dgCchmcH1zzTzzQvFwwdQQqnTGH6ULV9m4hv24,654
|
6
|
-
seleniumbase/__version__.py,sha256=
|
6
|
+
seleniumbase/__version__.py,sha256=KR__znOpy5AsgsVWqz_LZ7sCHyKIhIAuRWYcx4McUwU,47
|
7
7
|
seleniumbase/behave/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
8
|
seleniumbase/behave/behave_helper.py,sha256=elkl8P9eLulRAioLstE9baYNM9N_PHBmAOcajX-pH_Y,24198
|
9
9
|
seleniumbase/behave/behave_sb.py,sha256=qQF85LoohJBfrPK5ZcPi50v-pWtOrC9qcN1B3Ki_3tY,59401
|
@@ -16,7 +16,7 @@ seleniumbase/common/obfuscate.py,sha256=VrwPbVigPH_Jk6ADCk5_miMoq1VK4M9SKnYScDkk
|
|
16
16
|
seleniumbase/common/unobfuscate.py,sha256=MgP6MMT9Wam6ECFVIA84WsQczfl_dFiumFu9m3eXFDg,771
|
17
17
|
seleniumbase/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
18
18
|
seleniumbase/config/ad_block_list.py,sha256=qCQvbpONdSXk6q5tMwLuOswGYE1Syd8cy5TMIYFjTME,3380
|
19
|
-
seleniumbase/config/proxy_list.py,sha256=
|
19
|
+
seleniumbase/config/proxy_list.py,sha256=RoAiamWOudmenPqDcbf9oy9hGSFmylk6vnObKD-KjXo,1122
|
20
20
|
seleniumbase/config/settings.py,sha256=cAMmoFBQ6g8GCJIsRsSwGsP1_fJxhADxjHq30lFB18g,7815
|
21
21
|
seleniumbase/console_scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
22
|
seleniumbase/console_scripts/logo_helper.py,sha256=ZqS9TAwpcu5mM5ll-a0wTbXLs2Sbcsyo3EoC4jwtnME,2927
|
@@ -40,13 +40,13 @@ seleniumbase/core/browser_launcher.py,sha256=L7pvPQDMoQ8Mh0rrv3xvVxqsaeavdNp9ISh
|
|
40
40
|
seleniumbase/core/capabilities_parser.py,sha256=meIS2uHapTCq2ldfNAToC7r0cKmZDRXuYNKExM1GHDY,6038
|
41
41
|
seleniumbase/core/colored_traceback.py,sha256=DrRWfg7XEnKcgY59Xj7Jdk09H-XqHYBSUpB-DiZt6iY,2020
|
42
42
|
seleniumbase/core/create_db_tables.sql,sha256=VWPtrdiW_HQ6yETHjqTu-VIrTwvd8I8o1NfBeaVSHpU,972
|
43
|
-
seleniumbase/core/detect_b_ver.py,sha256=
|
43
|
+
seleniumbase/core/detect_b_ver.py,sha256=pqL_OjsAutvQEsr5KbYTqoKkYP6dtnPSxLhsxlObVX4,14934
|
44
44
|
seleniumbase/core/download_helper.py,sha256=qSR54kQISucF4RQaLCOuuerSu6DR41juGi_30HVvWYY,2943
|
45
45
|
seleniumbase/core/encoded_images.py,sha256=rDKJ4cNJSuKiRcFViYU7bjyTS9_moI57gUPRXVg3u2k,14209
|
46
46
|
seleniumbase/core/jqc_helper.py,sha256=2DDQr9Q2jSSZqFzX588jLlUM9oJvyrRWq2aORSIPUdI,10322
|
47
47
|
seleniumbase/core/log_helper.py,sha256=SW8wx2f2HfU3ERbANjxEC-jDbjy_IzaNYRKPlayfRRI,23442
|
48
48
|
seleniumbase/core/mysql.py,sha256=8Fzj3p5dhtDWfMpFqFYxpSwa9s1UltiHsWJ56_aPOqk,3993
|
49
|
-
seleniumbase/core/proxy_helper.py,sha256=
|
49
|
+
seleniumbase/core/proxy_helper.py,sha256=nmZoQOhdejPlTwaXbGoAYPM9qOKszQMfia2utHWYoIQ,8298
|
50
50
|
seleniumbase/core/recorder_helper.py,sha256=fNGjbapXmEsht54x1o6Igk198QdnPxDDnjUOzQxNhNQ,25055
|
51
51
|
seleniumbase/core/report_helper.py,sha256=AIl6Qava2yW1uSzbLpJBlPlYDz0KE-rVhogh8hsGWBo,12201
|
52
52
|
seleniumbase/core/s3_manager.py,sha256=bkeI8I4y19ebWuQG1oEZV5qJbotC6eN8vin31OCNWJk,3521
|
@@ -106,7 +106,7 @@ seleniumbase/translate/portuguese.py,sha256=x3P4qxp56UiI41GoaL7JbUvFRYsgXU1EKjTg
|
|
106
106
|
seleniumbase/translate/russian.py,sha256=TyN9n0b4GRWDEYnHRGw1rfNAscdDmP3F3Y3aySM3C7s,27978
|
107
107
|
seleniumbase/translate/spanish.py,sha256=hh3xgW1Pq122SHYVvJAxFaXhFrjniOVncVbJbfWqOUM,25528
|
108
108
|
seleniumbase/translate/translator.py,sha256=wPhZH6e5NhmebYL1kP2eGxUcVy1gfTb6XCH8ATEPpxE,49238
|
109
|
-
seleniumbase/undetected/__init__.py,sha256=
|
109
|
+
seleniumbase/undetected/__init__.py,sha256=fqizsCT79sZZV7mmQ-w7udTPaEM6mfGUl0uw2Vx8vKs,24016
|
110
110
|
seleniumbase/undetected/cdp.py,sha256=RLpwZnhUvmK9tgXcZIBBQedwk2q7Jj_EXZkmzI8WUqk,4023
|
111
111
|
seleniumbase/undetected/dprocess.py,sha256=83EV8ZHJWHG1TSUv9JNClBhdgiBXlkCc6mJ--HsoP3k,1681
|
112
112
|
seleniumbase/undetected/options.py,sha256=BoNuwhrG7oOvuLvTwkvsWCF36pMkS1tHCG-XpP4_EkI,3001
|
@@ -115,8 +115,8 @@ seleniumbase/undetected/reactor.py,sha256=NropaXcO54pzmDq6quR27qPJxab6636H7LRAaq
|
|
115
115
|
seleniumbase/undetected/webelement.py,sha256=_s6evgUkdWJpwOnzX4qR9i796PoVbz3txlzHlOBJ4BE,1370
|
116
116
|
seleniumbase/undetected/cdp_driver/__init__.py,sha256=c0TjMwPfVFyoqYOJ7PQ-Jln_L_dpN3ebHyaD-juQoM0,64
|
117
117
|
seleniumbase/undetected/cdp_driver/_contradict.py,sha256=lP4b0h5quAy573ETn_TBbYV889cL1AuPLVInpJ0ZkiU,3183
|
118
|
-
seleniumbase/undetected/cdp_driver/browser.py,sha256=
|
119
|
-
seleniumbase/undetected/cdp_driver/cdp_util.py,sha256=
|
118
|
+
seleniumbase/undetected/cdp_driver/browser.py,sha256=vwccwrAZDssRmVnf-NVXYvs5Dvv8DtGzeiDHSY3RTfM,30189
|
119
|
+
seleniumbase/undetected/cdp_driver/cdp_util.py,sha256=B5myq2zi-Gdq_vfZGPOG-LTSwbhK4n2h6SY2Z9dmIzQ,17784
|
120
120
|
seleniumbase/undetected/cdp_driver/config.py,sha256=oHFJ3UH0OmLmEGgG5S6SZwbyBs9ZYMsbUJ02QCA7iZc,12044
|
121
121
|
seleniumbase/undetected/cdp_driver/connection.py,sha256=sOTUGjbUqKA2hPvDcRCdqw1VQjVGJs7mbgVvzS7ldtE,23360
|
122
122
|
seleniumbase/undetected/cdp_driver/element.py,sha256=FIC6v7OmumLCT-_vIc3H4oju_oBbaLpWJUJIKm2c_q4,40467
|
@@ -135,9 +135,9 @@ seleniumbase/utilities/selenium_grid/start-grid-hub.bat,sha256=Ftq-GrAKRYH2ssDPr
|
|
135
135
|
seleniumbase/utilities/selenium_grid/start-grid-hub.sh,sha256=KADv0RUHONLL2_I443QFK8PryBpDmKn5Gy0s4o0vDSM,106
|
136
136
|
seleniumbase/utilities/selenium_ide/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
137
137
|
seleniumbase/utilities/selenium_ide/convert_ide.py,sha256=pZFnqEJQEKZPyNFjkLD29s2HPQgCrWW9XJWpCPhWOoM,31691
|
138
|
-
seleniumbase-4.34.
|
139
|
-
seleniumbase-4.34.
|
140
|
-
seleniumbase-4.34.
|
141
|
-
seleniumbase-4.34.
|
142
|
-
seleniumbase-4.34.
|
143
|
-
seleniumbase-4.34.
|
138
|
+
seleniumbase-4.34.11.dist-info/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
|
139
|
+
seleniumbase-4.34.11.dist-info/METADATA,sha256=DpNE1EfE3UwG59LOPmCFF4mSoSw3arc0HVfPnY6TMo4,86520
|
140
|
+
seleniumbase-4.34.11.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
141
|
+
seleniumbase-4.34.11.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
142
|
+
seleniumbase-4.34.11.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
143
|
+
seleniumbase-4.34.11.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|