intuned-runtime 1.2.2__py3-none-any.whl → 1.2.4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: intuned-runtime
3
- Version: 1.2.2
3
+ Version: 1.2.4
4
4
  Summary: Runtime commands for Intuned platform Python scrapers
5
5
  License: Elastic-2.0
6
6
  License-File: LICENSE
@@ -68,7 +68,7 @@ runtime/browser/__init__.py,sha256=EPWfa4ZmdR8GJqh2qcsx1ZvHmCYiUYrQ-zeHYVapH9s,2
68
68
  runtime/browser/helpers.py,sha256=CwgiBToawPgwAY9nIGkGHW544N7Db_OgKmS-SHkN2pU,1255
69
69
  runtime/browser/launch_browser.py,sha256=ym97J4RffOGUwhi9iNjAR5Ek2f8pKiAtAcDQFSqMJw0,1899
70
70
  runtime/browser/launch_camoufox.py,sha256=TBOAwwipNGlbtMdFYnGkVM0ppLU44vWNkMGZA5uPZCE,1787
71
- runtime/browser/launch_chromium.py,sha256=YvZig28k1e_txdNyheOAnh1P8r2o5sVQVcKIEXkjQRA,8038
71
+ runtime/browser/launch_chromium.py,sha256=XW2u1Ao6MfaMzqL5hnXhR8s8EzQ0TpjyHjSQXHpuAYM,6677
72
72
  runtime/browser/storage_state.py,sha256=fwLg8sP-H-vgt_6AJKNl03CpgyMVCQWWcN2cqswTQMs,3603
73
73
  runtime/constants.py,sha256=YMYQgCWZdJXUpxz_IN2TvZO5rFye9k_Lk9CS8m-shLg,34
74
74
  runtime/context/__init__.py,sha256=hg8ejm4bJy4tNkwmZ9lKgYJx6bU7OgOdBS684Uv5XGg,73
@@ -98,8 +98,8 @@ runtime/types/payload.py,sha256=sty8HgDEn3nJbZrwEOMCXyuG7_ICGDwlBIIWSON5ABY,124
98
98
  runtime/types/run_types.py,sha256=GcYLkL2BHxOjT4O3KvBP6xjBKsmJbjltMt_5bCVnfCI,4554
99
99
  runtime_helpers/__init__.py,sha256=1BPzEc-qC2WAYiCWDOJChpgnFyO3ZNYRKHEZqdHUGwM,322
100
100
  runtime_helpers/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
101
- intuned_runtime-1.2.2.dist-info/METADATA,sha256=IyR56IaaeamglTzQ0OOENJP78Kb9GNzSegBhcactZM0,5372
102
- intuned_runtime-1.2.2.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
103
- intuned_runtime-1.2.2.dist-info/entry_points.txt,sha256=ToMS2cqDeRmF1FGkflwoeD-Xz6jJV5p1zIbw9G7IxMg,85
104
- intuned_runtime-1.2.2.dist-info/licenses/LICENSE,sha256=9LIjQdgyU_ptzNIfItNCR7VmEHqYnrY1f1XwOreKFI0,3714
105
- intuned_runtime-1.2.2.dist-info/RECORD,,
101
+ intuned_runtime-1.2.4.dist-info/METADATA,sha256=dHCG5TB2mH07dwJNrxrhaclfvjJuH5juy7L2auOhdYY,5372
102
+ intuned_runtime-1.2.4.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
103
+ intuned_runtime-1.2.4.dist-info/entry_points.txt,sha256=ToMS2cqDeRmF1FGkflwoeD-Xz6jJV5p1zIbw9G7IxMg,85
104
+ intuned_runtime-1.2.4.dist-info/licenses/LICENSE,sha256=9LIjQdgyU_ptzNIfItNCR7VmEHqYnrY1f1XwOreKFI0,3714
105
+ intuned_runtime-1.2.4.dist-info/RECORD,,
@@ -19,40 +19,6 @@ if TYPE_CHECKING:
19
19
  from playwright.async_api import ViewportSize
20
20
 
21
21
 
22
- chromium_launch_args_to_ignore = [
23
- "--disable-field-trial-config",
24
- "--disable-background-networking",
25
- "--enable-features=NetworkService,NetworkServiceInProcess",
26
- "--disable-background-timer-throttling",
27
- "--disable-backgrounding-occluded-windows",
28
- "--disable-back-forward-cache",
29
- "--disable-breakpad",
30
- "--disable-client-side-phishing-detection",
31
- "--disable-component-extensions-with-background-pages",
32
- "--disable-component-update",
33
- "--no-default-browser-check",
34
- "--disable-default-apps",
35
- "--disable-dev-shm-usage",
36
- "--disable-extensions",
37
- "--disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate,TranslateUI",
38
- "--allow-pre-commit-input",
39
- "--disable-hang-monitor",
40
- "--disable-ipc-flooding-protection",
41
- "--disable-prompt-on-repost",
42
- "--disable-renderer-backgrounding",
43
- "--force-color-profile=srgb",
44
- "--metrics-recording-only",
45
- "--no-first-run",
46
- "--enable-automation",
47
- "--password-store=basic",
48
- "--use-mock-keychain",
49
- "--no-service-autorun",
50
- "--export-tagged-pdf",
51
- "--enable-use-zoom-for-dsf=false",
52
- "--disable-popup-blocking",
53
- ]
54
-
55
-
56
22
  async def create_user_dir_with_preferences():
57
23
  # Create a temporary directory
58
24
  playwright_temp_dir = anyio.Path(await anyio.mkdtemp(prefix="pw-"))
@@ -158,6 +124,8 @@ async def dangerous_launch_chromium(
158
124
  from playwright.async_api import async_playwright
159
125
  from playwright.async_api import Browser
160
126
 
127
+ temp_dir = await anyio.gettempdir()
128
+
161
129
  extra_args = [
162
130
  "--no-first-run",
163
131
  "--disable-sync",
@@ -166,6 +134,8 @@ async def dangerous_launch_chromium(
166
134
  "--disable-features=NetworkService",
167
135
  "--lang=en",
168
136
  "--disable-blink-features=AutomationControlled",
137
+ "--disable-dev-shm-usage",
138
+ f"--disk-cache-dir={temp_dir}/chrome-cache",
169
139
  ]
170
140
  playwright = await async_playwright().start()
171
141
  if cdp_url is not None:
@@ -193,7 +163,6 @@ async def dangerous_launch_chromium(
193
163
  kwargs.pop("viewport", None)
194
164
 
195
165
  if headless:
196
- chromium_launch_args_to_ignore.append("--headless")
197
166
  extra_args.append("--headless=new")
198
167
 
199
168
  if port:
@@ -204,7 +173,6 @@ async def dangerous_launch_chromium(
204
173
  headless=headless,
205
174
  viewport=viewport,
206
175
  proxy=proxy_env,
207
- ignore_default_args=chromium_launch_args_to_ignore,
208
176
  user_agent=os.environ.get("USER_AGENT", default_user_agent),
209
177
  args=extra_args,
210
178
  **kwargs,