intuned-runtime 1.3.0rc0__py3-none-any.whl → 1.3.1__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.
- {intuned_runtime-1.3.0rc0.dist-info → intuned_runtime-1.3.1.dist-info}/METADATA +1 -1
- {intuned_runtime-1.3.0rc0.dist-info → intuned_runtime-1.3.1.dist-info}/RECORD +6 -6
- runtime/browser/launch_chromium.py +15 -8
- {intuned_runtime-1.3.0rc0.dist-info → intuned_runtime-1.3.1.dist-info}/WHEEL +0 -0
- {intuned_runtime-1.3.0rc0.dist-info → intuned_runtime-1.3.1.dist-info}/entry_points.txt +0 -0
- {intuned_runtime-1.3.0rc0.dist-info → intuned_runtime-1.3.1.dist-info}/licenses/LICENSE +0 -0
@@ -71,7 +71,7 @@ runtime/browser/extensions/intuned_extension.py,sha256=_La0ikQX2isdiBgZXkZt2iQ6e
|
|
71
71
|
runtime/browser/helpers.py,sha256=CwgiBToawPgwAY9nIGkGHW544N7Db_OgKmS-SHkN2pU,1255
|
72
72
|
runtime/browser/launch_browser.py,sha256=ym97J4RffOGUwhi9iNjAR5Ek2f8pKiAtAcDQFSqMJw0,1899
|
73
73
|
runtime/browser/launch_camoufox.py,sha256=TBOAwwipNGlbtMdFYnGkVM0ppLU44vWNkMGZA5uPZCE,1787
|
74
|
-
runtime/browser/launch_chromium.py,sha256=
|
74
|
+
runtime/browser/launch_chromium.py,sha256=2hU2paJY55_e1UgvobKtaj2MlXKiiC8ac5HXTrONY8I,8155
|
75
75
|
runtime/browser/storage_state.py,sha256=fwLg8sP-H-vgt_6AJKNl03CpgyMVCQWWcN2cqswTQMs,3603
|
76
76
|
runtime/constants.py,sha256=YMYQgCWZdJXUpxz_IN2TvZO5rFye9k_Lk9CS8m-shLg,34
|
77
77
|
runtime/context/__init__.py,sha256=hg8ejm4bJy4tNkwmZ9lKgYJx6bU7OgOdBS684Uv5XGg,73
|
@@ -104,8 +104,8 @@ runtime/utils/__init__.py,sha256=v0qHjnc54YCkY1yPbXuihgymVZau_15xaEVyaFQj9ts,78
|
|
104
104
|
runtime/utils/config_loader.py,sha256=yqk2eDGbgyw0Xslgd3dJbB28NjUe02L9LyCxzCmH9r4,482
|
105
105
|
runtime_helpers/__init__.py,sha256=1BPzEc-qC2WAYiCWDOJChpgnFyO3ZNYRKHEZqdHUGwM,322
|
106
106
|
runtime_helpers/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
107
|
-
intuned_runtime-1.3.
|
108
|
-
intuned_runtime-1.3.
|
109
|
-
intuned_runtime-1.3.
|
110
|
-
intuned_runtime-1.3.
|
111
|
-
intuned_runtime-1.3.
|
107
|
+
intuned_runtime-1.3.1.dist-info/METADATA,sha256=WMEHeT7DdGH6Ck8LrQUfGeOfDm3YRD4Ar7z8AjohgMk,5372
|
108
|
+
intuned_runtime-1.3.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
109
|
+
intuned_runtime-1.3.1.dist-info/entry_points.txt,sha256=ToMS2cqDeRmF1FGkflwoeD-Xz6jJV5p1zIbw9G7IxMg,85
|
110
|
+
intuned_runtime-1.3.1.dist-info/licenses/LICENSE,sha256=9LIjQdgyU_ptzNIfItNCR7VmEHqYnrY1f1XwOreKFI0,3714
|
111
|
+
intuned_runtime-1.3.1.dist-info/RECORD,,
|
@@ -47,11 +47,6 @@ async def create_user_dir_with_preferences():
|
|
47
47
|
return await user_dir.absolute(), await playwright_temp_dir.absolute()
|
48
48
|
|
49
49
|
|
50
|
-
default_user_agent = (
|
51
|
-
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
|
52
|
-
)
|
53
|
-
|
54
|
-
|
55
50
|
@asynccontextmanager
|
56
51
|
async def launch_chromium(
|
57
52
|
headless: bool = True,
|
@@ -108,7 +103,6 @@ async def launch_chromium(
|
|
108
103
|
viewport=viewport,
|
109
104
|
proxy=proxy,
|
110
105
|
ignore_default_args=args_to_ignore,
|
111
|
-
user_agent=os.environ.get("USER_AGENT", default_user_agent),
|
112
106
|
args=extra_args,
|
113
107
|
**kwargs,
|
114
108
|
)
|
@@ -172,7 +166,21 @@ async def dangerous_launch_chromium(
|
|
172
166
|
# set view port for the already existing pages and any new pages
|
173
167
|
for page in context.pages:
|
174
168
|
await page.set_viewport_size(kwargs.get("viewport", {"width": 1280, "height": 800}))
|
175
|
-
|
169
|
+
|
170
|
+
async def set_viewport_size(page):
|
171
|
+
# check if the page is already closed
|
172
|
+
if page.is_closed():
|
173
|
+
return
|
174
|
+
try:
|
175
|
+
await page.set_viewport_size(kwargs.get("viewport", {"width": 1280, "height": 800}))
|
176
|
+
except Exception as e:
|
177
|
+
# check if the error because page closed then we don't need to raise an error
|
178
|
+
if page.is_closed():
|
179
|
+
return
|
180
|
+
else:
|
181
|
+
raise e
|
182
|
+
|
183
|
+
context.on("page", set_viewport_size)
|
176
184
|
user_preferences_dir = None
|
177
185
|
dir_to_clean = None
|
178
186
|
else:
|
@@ -199,7 +207,6 @@ async def dangerous_launch_chromium(
|
|
199
207
|
headless=headless,
|
200
208
|
viewport=viewport,
|
201
209
|
proxy=proxy_env,
|
202
|
-
user_agent=os.environ.get("USER_AGENT", default_user_agent),
|
203
210
|
args=extra_args,
|
204
211
|
**kwargs,
|
205
212
|
)
|
File without changes
|
File without changes
|
File without changes
|