PlaywrightCapture 1.24.7__py3-none-any.whl → 1.24.8__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.
@@ -1289,8 +1289,15 @@ class Capture():
1289
1289
  session.verify = False
1290
1290
  session.headers['user-agent'] = self.user_agent
1291
1291
  if self.proxy and self.proxy.get('server'):
1292
- proxies = {'http': self.proxy['server'],
1293
- 'https': self.proxy['server']}
1292
+ proxy_server = self.proxy['server']
1293
+ # Make sure the DNS desolution is done remotely
1294
+ # https://urllib3.readthedocs.io/en/stable/advanced-usage.html#socks-proxies
1295
+ if proxy_server.startswith('socks5://'):
1296
+ proxy_server = proxy_server.replace('socks5://', 'socks5h://')
1297
+ if proxy_server.startswith('socks4://'):
1298
+ proxy_server = proxy_server.replace('socks4://', 'socks4a://')
1299
+
1300
+ proxies = {'http': proxy_server, 'https': proxy_server}
1294
1301
  session.proxies.update(proxies)
1295
1302
  for u in to_fetch:
1296
1303
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PlaywrightCapture
3
- Version: 1.24.7
3
+ Version: 1.24.8
4
4
  Summary: A simple library to capture websites using playwright
5
5
  Home-page: https://github.com/Lookyloo/PlaywrightCapture
6
6
  License: BSD-3-Clause
@@ -1,9 +1,9 @@
1
1
  playwrightcapture/__init__.py,sha256=F90Y8wYS13tDjgsfjuFrCfmzQfdnH44G-ovuilJfLEE,511
2
- playwrightcapture/capture.py,sha256=z_5IfCbJl3pmLKnm8YTcxVC0XFPXhaqL9TXLCSQ6t0s,64760
2
+ playwrightcapture/capture.py,sha256=2oie2MptlkDKAEmc9KeSM9UlZK50LTT6jkuRkrS7prY,65183
3
3
  playwrightcapture/exceptions.py,sha256=LhGJQCGHzEu7Sx2Dfl28OFeDg1OmrwufFjAWXlxQnEA,366
4
4
  playwrightcapture/helpers.py,sha256=SXQLEuxMs8-bcWykMiUVosHzzxBKuS-QC0gBV3OmKmo,1764
5
5
  playwrightcapture/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- playwrightcapture-1.24.7.dist-info/LICENSE,sha256=uwFc39fTLacBUG-XTuxX6IQKTKhg4z14gWOLt3ex4Ho,1775
7
- playwrightcapture-1.24.7.dist-info/METADATA,sha256=W2FGoCXAodeRAD_ydGPQd8r2KTAQZr1oPAOzOcFzsmU,3149
8
- playwrightcapture-1.24.7.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
9
- playwrightcapture-1.24.7.dist-info/RECORD,,
6
+ playwrightcapture-1.24.8.dist-info/LICENSE,sha256=uwFc39fTLacBUG-XTuxX6IQKTKhg4z14gWOLt3ex4Ho,1775
7
+ playwrightcapture-1.24.8.dist-info/METADATA,sha256=og-mU2-oPLJ-vip4idHQRVsCkR8rk5D12hiqb-lkgLY,3149
8
+ playwrightcapture-1.24.8.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
9
+ playwrightcapture-1.24.8.dist-info/RECORD,,