PlaywrightCapture 1.31.4__py3-none-any.whl → 1.31.5__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.
@@ -498,7 +498,7 @@ class Capture():
498
498
  # 'navigator_vendor': False, # It's set correctly by playwright
499
499
  'navigator_webdriver': True,
500
500
  # 'sec_ch_ua': True,
501
- # 'webgl_vendor': False, # It's set correctly by playwright
501
+ 'webgl_vendor': True, # It's not net correctly by playwright in headless mode.
502
502
 
503
503
  # ## Overwrite the default values
504
504
  'navigator_languages_override': None,
@@ -508,10 +508,10 @@ class Capture():
508
508
  # 'sec_ch_ua_override': Stealth._get_greased_chrome_sec_ua_ch(ua),
509
509
  # 'webgl_renderer_override': None,
510
510
  # 'webgl_vendor_override': None,
511
- })
512
511
 
513
- # stealth.hook_playwright_context(self.playwright)
514
- await stealth.apply_stealth_async(self.context)
512
+ # For testing
513
+ # 'script_logging': True,
514
+ })
515
515
 
516
516
  if self.cookies:
517
517
  try:
@@ -559,6 +559,9 @@ class Capture():
559
559
  elif self.browser_name == 'chromium':
560
560
  await self.context.grant_permissions(chromium_permissions)
561
561
 
562
+ # Apply stealth
563
+ await stealth.apply_stealth_async(self.context)
564
+
562
565
  async def __cloudflare_bypass_attempt(self, page: Page) -> None:
563
566
  # This method aims to bypass cloudflare checks, but it mostly doesn't work.
564
567
  max_tries = 5
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: PlaywrightCapture
3
- Version: 1.31.4
3
+ Version: 1.31.5
4
4
  Summary: A simple library to capture websites using playwright
5
5
  License: BSD-3-Clause
6
6
  Author: Raphaël Vinot
@@ -25,7 +25,7 @@ Requires-Dist: async-timeout (>=5.0.1) ; python_version < "3.11"
25
25
  Requires-Dist: beautifulsoup4[charset-normalizer,lxml] (>=4.13.4)
26
26
  Requires-Dist: dateparser (>=1.2.2)
27
27
  Requires-Dist: dnspython (>=2.7.0,<3.0.0)
28
- Requires-Dist: playwright (>=1.53.0)
28
+ Requires-Dist: playwright (>=1.54.0)
29
29
  Requires-Dist: playwright-stealth (>=2)
30
30
  Requires-Dist: puremagic (>=1.30)
31
31
  Requires-Dist: pydub (>=0.25.1) ; (python_version < "3.10") and (extra == "recaptcha")
@@ -1,10 +1,10 @@
1
1
  playwrightcapture/__init__.py,sha256=F90Y8wYS13tDjgsfjuFrCfmzQfdnH44G-ovuilJfLEE,511
2
- playwrightcapture/capture.py,sha256=qWDwQt7pKOr3fQUhidY_U9bO8cIIOSiqSaTNxUdkT3M,87111
2
+ playwrightcapture/capture.py,sha256=CNV-TbnUj8HXFaEmxIxKTeuXsKkVFsA7bCdNJKCTvnI,87166
3
3
  playwrightcapture/exceptions.py,sha256=LhGJQCGHzEu7Sx2Dfl28OFeDg1OmrwufFjAWXlxQnEA,366
4
4
  playwrightcapture/helpers.py,sha256=Xqs09zHhzAWnpBtQ0A9YAxg80P3Lj7aBj5M2WuEr0so,1843
5
5
  playwrightcapture/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  playwrightcapture/socks5dnslookup.py,sha256=ZpOf8tgsRQZi-WDcn9JbbG1bKz9DSfK_jz1l53UI1Ho,4058
7
- playwrightcapture-1.31.4.dist-info/LICENSE,sha256=uwFc39fTLacBUG-XTuxX6IQKTKhg4z14gWOLt3ex4Ho,1775
8
- playwrightcapture-1.31.4.dist-info/METADATA,sha256=y6QEbPdB1201g3Z81no658PsoD5OoxdyT81LjDCk3uA,3285
9
- playwrightcapture-1.31.4.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
10
- playwrightcapture-1.31.4.dist-info/RECORD,,
7
+ playwrightcapture-1.31.5.dist-info/LICENSE,sha256=uwFc39fTLacBUG-XTuxX6IQKTKhg4z14gWOLt3ex4Ho,1775
8
+ playwrightcapture-1.31.5.dist-info/METADATA,sha256=44oFmm1jYLUz1vPX2HJgCe3CJSO-BqMDzdIZfGBNtnw,3285
9
+ playwrightcapture-1.31.5.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
10
+ playwrightcapture-1.31.5.dist-info/RECORD,,