funbrowser 0.1.0__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.
Files changed (57) hide show
  1. funbrowser/__init__.py +120 -0
  2. funbrowser/_cdp.py +181 -0
  3. funbrowser/_errors.py +32 -0
  4. funbrowser/_flags.py +89 -0
  5. funbrowser/_launcher.py +153 -0
  6. funbrowser/browser.py +281 -0
  7. funbrowser/context.py +163 -0
  8. funbrowser/context_pool.py +162 -0
  9. funbrowser/element.py +258 -0
  10. funbrowser/fingerprint/__init__.py +14 -0
  11. funbrowser/fingerprint/data.py +74 -0
  12. funbrowser/fingerprint/presets.py +588 -0
  13. funbrowser/geo.py +139 -0
  14. funbrowser/humanly.py +188 -0
  15. funbrowser/panel.py +1181 -0
  16. funbrowser/pool.py +152 -0
  17. funbrowser/profile.py +73 -0
  18. funbrowser/proxy.py +236 -0
  19. funbrowser/py.typed +0 -0
  20. funbrowser/solver/__init__.py +12 -0
  21. funbrowser/solver/bridge.py +167 -0
  22. funbrowser/solver/client.py +244 -0
  23. funbrowser/solver/scripts/__init__.py +0 -0
  24. funbrowser/solver/scripts/_bootstrap.js +30 -0
  25. funbrowser/solver/scripts/funcaptcha.js +74 -0
  26. funbrowser/solver/scripts/geetest.js +76 -0
  27. funbrowser/solver/scripts/hcaptcha.js +76 -0
  28. funbrowser/solver/scripts/recaptcha_v2.js +79 -0
  29. funbrowser/solver/scripts/recaptcha_v3.js +45 -0
  30. funbrowser/solver/scripts/turnstile.js +60 -0
  31. funbrowser/stealth/__init__.py +13 -0
  32. funbrowser/stealth/flags.py +54 -0
  33. funbrowser/stealth/patches.py +214 -0
  34. funbrowser/stealth/scripts/__init__.py +0 -0
  35. funbrowser/stealth/scripts/_camouflage.js +32 -0
  36. funbrowser/stealth/scripts/_cleanup.js +8 -0
  37. funbrowser/stealth/scripts/audio_noise.js +32 -0
  38. funbrowser/stealth/scripts/canvas_noise.js +43 -0
  39. funbrowser/stealth/scripts/chrome_runtime.js +53 -0
  40. funbrowser/stealth/scripts/hardware.js +15 -0
  41. funbrowser/stealth/scripts/languages.js +13 -0
  42. funbrowser/stealth/scripts/permissions.js +15 -0
  43. funbrowser/stealth/scripts/platform.js +18 -0
  44. funbrowser/stealth/scripts/plugins.js +37 -0
  45. funbrowser/stealth/scripts/screen_props.js +18 -0
  46. funbrowser/stealth/scripts/webdriver.js +14 -0
  47. funbrowser/stealth/scripts/webgl.js +27 -0
  48. funbrowser/stealth/scripts/webrtc.js +45 -0
  49. funbrowser/tab.py +345 -0
  50. funbrowser/tls/__init__.py +25 -0
  51. funbrowser/tls/ca.py +181 -0
  52. funbrowser/tls/http.py +145 -0
  53. funbrowser/tls/mitm.py +326 -0
  54. funbrowser-0.1.0.dist-info/METADATA +316 -0
  55. funbrowser-0.1.0.dist-info/RECORD +57 -0
  56. funbrowser-0.1.0.dist-info/WHEEL +4 -0
  57. funbrowser-0.1.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,588 @@
1
+ """Concrete Fingerprint presets covering common desktop and mobile configurations.
2
+
3
+ The brand list embedded in each preset uses ``CHROME_MAJOR_PLACEHOLDER`` for
4
+ the Chrome major version — it's substituted by ``apply_stealth`` at attach
5
+ time using the actual installed Chrome's version, so the UA-CH brands stay
6
+ consistent with reality even when Chrome auto-updates.
7
+
8
+ If you need a fingerprint not covered here, build a :class:`Fingerprint`
9
+ directly or :meth:`Fingerprint.merge` a preset with your overrides.
10
+ """
11
+
12
+ from __future__ import annotations
13
+
14
+ from .data import Fingerprint
15
+
16
+ CHROME_MAJOR_PLACEHOLDER = "{CHROME_MAJOR}"
17
+ CHROME_FULL_PLACEHOLDER = "{CHROME_FULL}"
18
+
19
+
20
+ def _ua_windows(chrome: str = CHROME_FULL_PLACEHOLDER) -> str:
21
+ return (
22
+ f"Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
23
+ f"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/{chrome} Safari/537.36"
24
+ )
25
+
26
+
27
+ def _ua_macos(chrome: str = CHROME_FULL_PLACEHOLDER) -> str:
28
+ # Chrome on macOS freezes the OS bit at 10_15_7 since 100.0 for anti-fp.
29
+ return (
30
+ f"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) "
31
+ f"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/{chrome} Safari/537.36"
32
+ )
33
+
34
+
35
+ def _ua_linux(chrome: str = CHROME_FULL_PLACEHOLDER) -> str:
36
+ return (
37
+ f"Mozilla/5.0 (X11; Linux x86_64) "
38
+ f"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/{chrome} Safari/537.36"
39
+ )
40
+
41
+
42
+ def _ua_android(model: str, android_version: str, chrome: str = CHROME_FULL_PLACEHOLDER) -> str:
43
+ return (
44
+ f"Mozilla/5.0 (Linux; Android {android_version}; {model}) "
45
+ f"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/{chrome} "
46
+ f"Mobile Safari/537.36"
47
+ )
48
+
49
+
50
+ _DEFAULT_BRANDS: tuple[tuple[str, str], ...] = (
51
+ ("Chromium", CHROME_MAJOR_PLACEHOLDER),
52
+ ("Google Chrome", CHROME_MAJOR_PLACEHOLDER),
53
+ ("Not_A Brand", "99"),
54
+ )
55
+
56
+
57
+ # ── Windows ──────────────────────────────────────────────────────────────
58
+
59
+
60
+ def windows_11_nvidia_rtx_4070() -> Fingerprint:
61
+ return Fingerprint(
62
+ label="Windows 11 / NVIDIA RTX 4070 / 16C32T / 32GB",
63
+ tags=("windows", "nvidia", "high-end", "desktop"),
64
+ user_agent=_ua_windows(),
65
+ accept_language="en-US,en;q=0.9",
66
+ platform="Windows",
67
+ platform_version="15.0.0",
68
+ architecture="x86",
69
+ bitness="64",
70
+ mobile=False,
71
+ brands=_DEFAULT_BRANDS,
72
+ languages=("en-US", "en"),
73
+ hardware_concurrency=32,
74
+ device_memory=8,
75
+ max_touch_points=0,
76
+ screen_width=2560,
77
+ screen_height=1440,
78
+ avail_width=2560,
79
+ avail_height=1392,
80
+ color_depth=24,
81
+ device_pixel_ratio=1.0,
82
+ webgl_vendor="Google Inc. (NVIDIA)",
83
+ webgl_renderer=(
84
+ "ANGLE (NVIDIA, NVIDIA GeForce RTX 4070 (0x00002786) Direct3D11 vs_5_0 ps_5_0, D3D11)"
85
+ ),
86
+ )
87
+
88
+
89
+ def windows_10_intel_uhd_630() -> Fingerprint:
90
+ return Fingerprint(
91
+ label="Windows 10 / Intel UHD 630 / 8C16T / 16GB",
92
+ tags=("windows", "intel", "mid", "desktop"),
93
+ user_agent=_ua_windows(),
94
+ accept_language="en-US,en;q=0.9",
95
+ platform="Windows",
96
+ platform_version="10.0.0",
97
+ architecture="x86",
98
+ bitness="64",
99
+ mobile=False,
100
+ brands=_DEFAULT_BRANDS,
101
+ languages=("en-US", "en"),
102
+ hardware_concurrency=16,
103
+ device_memory=8,
104
+ max_touch_points=0,
105
+ screen_width=1920,
106
+ screen_height=1080,
107
+ avail_width=1920,
108
+ avail_height=1040,
109
+ color_depth=24,
110
+ device_pixel_ratio=1.0,
111
+ webgl_vendor="Google Inc. (Intel)",
112
+ webgl_renderer=(
113
+ "ANGLE (Intel, Intel(R) UHD Graphics 630 (0x00003E9B) Direct3D11 vs_5_0 ps_5_0, D3D11)"
114
+ ),
115
+ )
116
+
117
+
118
+ def windows_11_amd_radeon_6700_xt() -> Fingerprint:
119
+ return Fingerprint(
120
+ label="Windows 11 / AMD Radeon RX 6700 XT / 12C24T / 32GB",
121
+ tags=("windows", "amd", "high-end", "desktop"),
122
+ user_agent=_ua_windows(),
123
+ accept_language="en-US,en;q=0.9",
124
+ platform="Windows",
125
+ platform_version="15.0.0",
126
+ architecture="x86",
127
+ bitness="64",
128
+ mobile=False,
129
+ brands=_DEFAULT_BRANDS,
130
+ languages=("en-US", "en"),
131
+ hardware_concurrency=24,
132
+ device_memory=8,
133
+ max_touch_points=0,
134
+ screen_width=2560,
135
+ screen_height=1440,
136
+ avail_width=2560,
137
+ avail_height=1392,
138
+ color_depth=24,
139
+ device_pixel_ratio=1.0,
140
+ webgl_vendor="Google Inc. (AMD)",
141
+ webgl_renderer=("ANGLE (AMD, AMD Radeon RX 6700 XT Direct3D11 vs_5_0 ps_5_0, D3D11)"),
142
+ )
143
+
144
+
145
+ def windows_10_laptop_low_end() -> Fingerprint:
146
+ return Fingerprint(
147
+ label="Windows 10 / Intel HD 4400 / 4C / 8GB / 1366x768",
148
+ tags=("windows", "intel", "low-end", "laptop"),
149
+ user_agent=_ua_windows(),
150
+ accept_language="en-US,en;q=0.9",
151
+ platform="Windows",
152
+ platform_version="10.0.0",
153
+ architecture="x86",
154
+ bitness="64",
155
+ mobile=False,
156
+ brands=_DEFAULT_BRANDS,
157
+ languages=("en-US", "en"),
158
+ hardware_concurrency=4,
159
+ device_memory=8,
160
+ max_touch_points=0,
161
+ screen_width=1366,
162
+ screen_height=768,
163
+ avail_width=1366,
164
+ avail_height=728,
165
+ color_depth=24,
166
+ device_pixel_ratio=1.0,
167
+ webgl_vendor="Google Inc. (Intel)",
168
+ webgl_renderer=("ANGLE (Intel, Intel(R) HD Graphics 4400 Direct3D11 vs_5_0 ps_5_0, D3D11)"),
169
+ )
170
+
171
+
172
+ # ── macOS ────────────────────────────────────────────────────────────────
173
+
174
+
175
+ def macos_apple_silicon_m3_pro() -> Fingerprint:
176
+ return Fingerprint(
177
+ label="macOS Sonoma / Apple M3 Pro / 12C / 36GB / 1728x1117",
178
+ tags=("macos", "apple-silicon", "high-end", "laptop"),
179
+ user_agent=_ua_macos(),
180
+ accept_language="en-US,en;q=0.9",
181
+ platform="macOS",
182
+ platform_version="14.6.0",
183
+ architecture="arm",
184
+ bitness="64",
185
+ mobile=False,
186
+ brands=_DEFAULT_BRANDS,
187
+ languages=("en-US", "en"),
188
+ hardware_concurrency=12,
189
+ device_memory=8,
190
+ max_touch_points=0,
191
+ screen_width=1728,
192
+ screen_height=1117,
193
+ avail_width=1728,
194
+ avail_height=1079,
195
+ color_depth=30,
196
+ device_pixel_ratio=2.0,
197
+ webgl_vendor="Google Inc. (Apple)",
198
+ webgl_renderer="ANGLE (Apple, ANGLE Metal Renderer: Apple M3 Pro, Unspecified Version)",
199
+ )
200
+
201
+
202
+ def macos_intel_iris() -> Fingerprint:
203
+ return Fingerprint(
204
+ label="macOS Big Sur / Intel Iris Plus 645 / 8C / 16GB / 1440x900",
205
+ tags=("macos", "intel", "mid", "laptop"),
206
+ user_agent=_ua_macos(),
207
+ accept_language="en-US,en;q=0.9",
208
+ platform="macOS",
209
+ platform_version="11.7.10",
210
+ architecture="x86",
211
+ bitness="64",
212
+ mobile=False,
213
+ brands=_DEFAULT_BRANDS,
214
+ languages=("en-US", "en"),
215
+ hardware_concurrency=8,
216
+ device_memory=8,
217
+ max_touch_points=0,
218
+ screen_width=1440,
219
+ screen_height=900,
220
+ avail_width=1440,
221
+ avail_height=875,
222
+ color_depth=24,
223
+ device_pixel_ratio=2.0,
224
+ webgl_vendor="Google Inc. (Intel Inc.)",
225
+ webgl_renderer="ANGLE (Intel Inc., Intel(R) Iris(TM) Plus Graphics 645, OpenGL 4.1)",
226
+ )
227
+
228
+
229
+ # ── Windows (extra) ──────────────────────────────────────────────────────
230
+
231
+
232
+ def windows_11_nvidia_rtx_4090() -> Fingerprint:
233
+ return Fingerprint(
234
+ label="Windows 11 / NVIDIA RTX 4090 / 24C32T / 64GB / 3840x2160",
235
+ tags=("windows", "nvidia", "high-end", "desktop", "4k"),
236
+ user_agent=_ua_windows(),
237
+ accept_language="en-US,en;q=0.9",
238
+ platform="Windows",
239
+ platform_version="15.0.0",
240
+ architecture="x86",
241
+ bitness="64",
242
+ mobile=False,
243
+ brands=_DEFAULT_BRANDS,
244
+ languages=("en-US", "en"),
245
+ hardware_concurrency=32,
246
+ device_memory=8,
247
+ max_touch_points=0,
248
+ screen_width=3840,
249
+ screen_height=2160,
250
+ avail_width=3840,
251
+ avail_height=2112,
252
+ color_depth=24,
253
+ device_pixel_ratio=1.0,
254
+ webgl_vendor="Google Inc. (NVIDIA)",
255
+ webgl_renderer=(
256
+ "ANGLE (NVIDIA, NVIDIA GeForce RTX 4090 (0x00002684) Direct3D11 vs_5_0 ps_5_0, D3D11)"
257
+ ),
258
+ )
259
+
260
+
261
+ def windows_11_nvidia_rtx_3070() -> Fingerprint:
262
+ return Fingerprint(
263
+ label="Windows 11 / NVIDIA RTX 3070 / 12C20T / 32GB / 2560x1440",
264
+ tags=("windows", "nvidia", "mid-high", "desktop"),
265
+ user_agent=_ua_windows(),
266
+ accept_language="en-US,en;q=0.9",
267
+ platform="Windows",
268
+ platform_version="15.0.0",
269
+ architecture="x86",
270
+ bitness="64",
271
+ mobile=False,
272
+ brands=_DEFAULT_BRANDS,
273
+ languages=("en-US", "en"),
274
+ hardware_concurrency=20,
275
+ device_memory=8,
276
+ max_touch_points=0,
277
+ screen_width=2560,
278
+ screen_height=1440,
279
+ avail_width=2560,
280
+ avail_height=1392,
281
+ color_depth=24,
282
+ device_pixel_ratio=1.0,
283
+ webgl_vendor="Google Inc. (NVIDIA)",
284
+ webgl_renderer=(
285
+ "ANGLE (NVIDIA, NVIDIA GeForce RTX 3070 (0x00002484) Direct3D11 vs_5_0 ps_5_0, D3D11)"
286
+ ),
287
+ )
288
+
289
+
290
+ def windows_11_amd_rx_7900_xtx() -> Fingerprint:
291
+ return Fingerprint(
292
+ label="Windows 11 / AMD RX 7900 XTX / 16C32T / 64GB / 3440x1440",
293
+ tags=("windows", "amd", "high-end", "desktop", "ultrawide"),
294
+ user_agent=_ua_windows(),
295
+ accept_language="en-US,en;q=0.9",
296
+ platform="Windows",
297
+ platform_version="15.0.0",
298
+ architecture="x86",
299
+ bitness="64",
300
+ mobile=False,
301
+ brands=_DEFAULT_BRANDS,
302
+ languages=("en-US", "en"),
303
+ hardware_concurrency=32,
304
+ device_memory=8,
305
+ max_touch_points=0,
306
+ screen_width=3440,
307
+ screen_height=1440,
308
+ avail_width=3440,
309
+ avail_height=1392,
310
+ color_depth=24,
311
+ device_pixel_ratio=1.0,
312
+ webgl_vendor="Google Inc. (AMD)",
313
+ webgl_renderer=("ANGLE (AMD, AMD Radeon RX 7900 XTX Direct3D11 vs_5_0 ps_5_0, D3D11)"),
314
+ )
315
+
316
+
317
+ def windows_10_nvidia_gtx_1060() -> Fingerprint:
318
+ return Fingerprint(
319
+ label="Windows 10 / NVIDIA GTX 1060 / 8C16T / 16GB / 1920x1080",
320
+ tags=("windows", "nvidia", "mid", "desktop", "older"),
321
+ user_agent=_ua_windows(),
322
+ accept_language="en-US,en;q=0.9",
323
+ platform="Windows",
324
+ platform_version="10.0.0",
325
+ architecture="x86",
326
+ bitness="64",
327
+ mobile=False,
328
+ brands=_DEFAULT_BRANDS,
329
+ languages=("en-US", "en"),
330
+ hardware_concurrency=16,
331
+ device_memory=8,
332
+ max_touch_points=0,
333
+ screen_width=1920,
334
+ screen_height=1080,
335
+ avail_width=1920,
336
+ avail_height=1040,
337
+ color_depth=24,
338
+ device_pixel_ratio=1.0,
339
+ webgl_vendor="Google Inc. (NVIDIA)",
340
+ webgl_renderer=(
341
+ "ANGLE (NVIDIA, NVIDIA GeForce GTX 1060 6GB "
342
+ "(0x00001C03) Direct3D11 vs_5_0 ps_5_0, D3D11)"
343
+ ),
344
+ )
345
+
346
+
347
+ # ── macOS (extra) ────────────────────────────────────────────────────────
348
+
349
+
350
+ def macos_apple_silicon_m2() -> Fingerprint:
351
+ return Fingerprint(
352
+ label="macOS Ventura / Apple M2 / 8C / 16GB / 1512x982",
353
+ tags=("macos", "apple-silicon", "mid", "laptop"),
354
+ user_agent=_ua_macos(),
355
+ accept_language="en-US,en;q=0.9",
356
+ platform="macOS",
357
+ platform_version="13.6.0",
358
+ architecture="arm",
359
+ bitness="64",
360
+ mobile=False,
361
+ brands=_DEFAULT_BRANDS,
362
+ languages=("en-US", "en"),
363
+ hardware_concurrency=8,
364
+ device_memory=8,
365
+ max_touch_points=0,
366
+ screen_width=1512,
367
+ screen_height=982,
368
+ avail_width=1512,
369
+ avail_height=944,
370
+ color_depth=30,
371
+ device_pixel_ratio=2.0,
372
+ webgl_vendor="Google Inc. (Apple)",
373
+ webgl_renderer="ANGLE (Apple, ANGLE Metal Renderer: Apple M2, Unspecified Version)",
374
+ )
375
+
376
+
377
+ # ── Linux (extra) ────────────────────────────────────────────────────────
378
+
379
+
380
+ def linux_nvidia_desktop() -> Fingerprint:
381
+ return Fingerprint(
382
+ label="Linux / NVIDIA RTX 3060 / 12C24T / 32GB / 2560x1440",
383
+ tags=("linux", "nvidia", "high-end", "desktop"),
384
+ user_agent=_ua_linux(),
385
+ accept_language="en-US,en;q=0.9",
386
+ platform="Linux",
387
+ platform_version="",
388
+ architecture="x86",
389
+ bitness="64",
390
+ mobile=False,
391
+ brands=_DEFAULT_BRANDS,
392
+ languages=("en-US", "en"),
393
+ hardware_concurrency=24,
394
+ device_memory=8,
395
+ max_touch_points=0,
396
+ screen_width=2560,
397
+ screen_height=1440,
398
+ avail_width=2560,
399
+ avail_height=1413,
400
+ color_depth=24,
401
+ device_pixel_ratio=1.0,
402
+ webgl_vendor="NVIDIA Corporation",
403
+ webgl_renderer="NVIDIA GeForce RTX 3060/PCIe/SSE2",
404
+ )
405
+
406
+
407
+ # ── Android Mobile ───────────────────────────────────────────────────────
408
+
409
+
410
+ def android_pixel_8() -> Fingerprint:
411
+ """Google Pixel 8 / Android 14 / Tensor G3 / Mali-G715."""
412
+ return Fingerprint(
413
+ label="Android 14 / Pixel 8 / Tensor G3 / Mali-G715 / 412x915",
414
+ tags=("android", "mobile", "high-end", "google", "arm"),
415
+ user_agent=_ua_android("Pixel 8", "14"),
416
+ accept_language="en-US,en;q=0.9",
417
+ platform="Android",
418
+ platform_version="14.0.0",
419
+ architecture="arm",
420
+ bitness="64",
421
+ mobile=True,
422
+ brands=_DEFAULT_BRANDS,
423
+ languages=("en-US", "en"),
424
+ hardware_concurrency=9,
425
+ device_memory=8,
426
+ max_touch_points=5,
427
+ screen_width=412,
428
+ screen_height=915,
429
+ avail_width=412,
430
+ avail_height=915,
431
+ color_depth=24,
432
+ device_pixel_ratio=2.625,
433
+ webgl_vendor="ARM",
434
+ webgl_renderer="Mali-G715-Immortalis MC10 r43p0",
435
+ )
436
+
437
+
438
+ def android_galaxy_s23() -> Fingerprint:
439
+ """Samsung Galaxy S23 / Android 14 / Snapdragon 8 Gen 2 / Adreno 740."""
440
+ return Fingerprint(
441
+ label="Android 14 / Galaxy S23 / Snapdragon 8 Gen 2 / Adreno 740 / 360x780",
442
+ tags=("android", "mobile", "high-end", "samsung", "arm"),
443
+ user_agent=_ua_android("SM-S911B", "14"),
444
+ accept_language="en-US,en;q=0.9",
445
+ platform="Android",
446
+ platform_version="14.0.0",
447
+ architecture="arm",
448
+ bitness="64",
449
+ mobile=True,
450
+ brands=_DEFAULT_BRANDS,
451
+ languages=("en-US", "en"),
452
+ hardware_concurrency=8,
453
+ device_memory=8,
454
+ max_touch_points=5,
455
+ screen_width=360,
456
+ screen_height=780,
457
+ avail_width=360,
458
+ avail_height=780,
459
+ color_depth=24,
460
+ device_pixel_ratio=3.0,
461
+ webgl_vendor="Qualcomm",
462
+ webgl_renderer="Adreno (TM) 740",
463
+ )
464
+
465
+
466
+ def android_pixel_6a() -> Fingerprint:
467
+ """Google Pixel 6a / Android 13 / Tensor / Mali-G78."""
468
+ return Fingerprint(
469
+ label="Android 13 / Pixel 6a / Tensor / Mali-G78 / 412x892",
470
+ tags=("android", "mobile", "mid", "google", "arm"),
471
+ user_agent=_ua_android("Pixel 6a", "13"),
472
+ accept_language="en-US,en;q=0.9",
473
+ platform="Android",
474
+ platform_version="13.0.0",
475
+ architecture="arm",
476
+ bitness="64",
477
+ mobile=True,
478
+ brands=_DEFAULT_BRANDS,
479
+ languages=("en-US", "en"),
480
+ hardware_concurrency=8,
481
+ device_memory=8,
482
+ max_touch_points=5,
483
+ screen_width=412,
484
+ screen_height=892,
485
+ avail_width=412,
486
+ avail_height=892,
487
+ color_depth=24,
488
+ device_pixel_ratio=2.625,
489
+ webgl_vendor="ARM",
490
+ webgl_renderer="Mali-G78 MP20",
491
+ )
492
+
493
+
494
+ def android_budget_galaxy_a52() -> Fingerprint:
495
+ """Samsung Galaxy A52 / Android 13 / Snapdragon 720G / Adreno 618."""
496
+ return Fingerprint(
497
+ label="Android 13 / Galaxy A52 / Snapdragon 720G / Adreno 618 / 360x780",
498
+ tags=("android", "mobile", "budget", "low-end", "samsung", "arm"),
499
+ user_agent=_ua_android("SM-A525F", "13"),
500
+ accept_language="en-US,en;q=0.9",
501
+ platform="Android",
502
+ platform_version="13.0.0",
503
+ architecture="arm",
504
+ bitness="64",
505
+ mobile=True,
506
+ brands=_DEFAULT_BRANDS,
507
+ languages=("en-US", "en"),
508
+ hardware_concurrency=8,
509
+ device_memory=4,
510
+ max_touch_points=5,
511
+ screen_width=360,
512
+ screen_height=780,
513
+ avail_width=360,
514
+ avail_height=780,
515
+ color_depth=24,
516
+ device_pixel_ratio=2.625,
517
+ webgl_vendor="Qualcomm",
518
+ webgl_renderer="Adreno (TM) 618",
519
+ )
520
+
521
+
522
+ # ── Linux ────────────────────────────────────────────────────────────────
523
+
524
+
525
+ def linux_intel_uhd() -> Fingerprint:
526
+ return Fingerprint(
527
+ label="Linux / Mesa Intel UHD / 8C / 16GB / 1920x1080",
528
+ tags=("linux", "intel", "mid", "desktop"),
529
+ user_agent=_ua_linux(),
530
+ accept_language="en-US,en;q=0.9",
531
+ platform="Linux",
532
+ platform_version="",
533
+ architecture="x86",
534
+ bitness="64",
535
+ mobile=False,
536
+ brands=_DEFAULT_BRANDS,
537
+ languages=("en-US", "en"),
538
+ hardware_concurrency=8,
539
+ device_memory=8,
540
+ max_touch_points=0,
541
+ screen_width=1920,
542
+ screen_height=1080,
543
+ avail_width=1920,
544
+ avail_height=1053,
545
+ color_depth=24,
546
+ device_pixel_ratio=1.0,
547
+ webgl_vendor="Mesa",
548
+ webgl_renderer="Mesa Intel(R) UHD Graphics (CFL GT2)",
549
+ )
550
+
551
+
552
+ # ── Index ────────────────────────────────────────────────────────────────
553
+
554
+
555
+ ALL: tuple[Fingerprint, ...] = (
556
+ # Desktop — Windows
557
+ windows_11_nvidia_rtx_4090(),
558
+ windows_11_nvidia_rtx_4070(),
559
+ windows_11_nvidia_rtx_3070(),
560
+ windows_11_amd_rx_7900_xtx(),
561
+ windows_11_amd_radeon_6700_xt(),
562
+ windows_10_intel_uhd_630(),
563
+ windows_10_nvidia_gtx_1060(),
564
+ windows_10_laptop_low_end(),
565
+ # Desktop — macOS
566
+ macos_apple_silicon_m3_pro(),
567
+ macos_apple_silicon_m2(),
568
+ macos_intel_iris(),
569
+ # Desktop — Linux
570
+ linux_nvidia_desktop(),
571
+ linux_intel_uhd(),
572
+ # Mobile — Android
573
+ android_pixel_8(),
574
+ android_galaxy_s23(),
575
+ android_pixel_6a(),
576
+ android_budget_galaxy_a52(),
577
+ )
578
+
579
+
580
+ def by_label(label: str) -> Fingerprint:
581
+ for fp in ALL:
582
+ if fp.label == label:
583
+ return fp
584
+ raise KeyError(f"No preset with label {label!r}. Available: {[p.label for p in ALL]}")
585
+
586
+
587
+ def filter_by_tag(tag: str) -> tuple[Fingerprint, ...]:
588
+ return tuple(fp for fp in ALL if tag in fp.tags)