notify-tls-client 2.0.2__py3-none-any.whl → 2.0.3__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.
@@ -6,24 +6,59 @@ import os
6
6
 
7
7
 
8
8
  if platform == 'darwin':
9
- file_ext = '-arm64-*.dylib' if machine() == "arm64" else '-x86-*.dylib'
9
+ # macOS: buscar por tls-client-darwin-{arch}-*.dylib ou tls-client-{arch}-*.dylib
10
+ if machine() == "arm64":
11
+ search_patterns = ['-darwin-arm64-*.dylib', '-arm64-*.dylib']
12
+ else:
13
+ search_patterns = ['-darwin-amd64-*.dylib', '-darwin-x86-*.dylib', '-x86-*.dylib', '-amd64-*.dylib']
10
14
  elif platform in ('win32', 'cygwin'):
11
- file_ext = '*-64-*.dll' if 8 == ctypes.sizeof(ctypes.c_voidp) else '*-32-*.dll'
15
+ # Windows: buscar por tls-client-windows-{bits}-*.dll ou tls-client-{bits}-*.dll
16
+ if 8 == ctypes.sizeof(ctypes.c_voidp):
17
+ search_patterns = ['-windows-64-*.dll', '-windows-amd64-*.dll', '-64-*.dll', '-amd64-*.dll']
18
+ else:
19
+ search_patterns = ['-windows-32-*.dll', '-windows-x86-*.dll', '-32-*.dll', '-x86-*.dll']
12
20
  else:
13
- if machine() == "aarch64":
14
- file_ext = '-arm64-*.so'
15
- elif "x86" in machine():
16
- file_ext = '-x86-*.so'
21
+ # Linux: buscar por tls-client-linux-{distro}-{arch}-*.so ou tls-client-linux-{arch}-*.so ou tls-client-{arch}-*.so
22
+ machine_type = machine().lower()
23
+ if "aarch64" in machine_type or "arm64" in machine_type:
24
+ search_patterns = ['-linux-*-arm64-*.so', '-linux-arm64-*.so', '-arm64-*.so']
25
+ elif "x86_64" in machine_type or "amd64" in machine_type:
26
+ search_patterns = ['-linux-*-amd64-*.so', '-linux-amd64-*.so', '-amd64-*.so']
27
+ elif "x86" in machine_type or "i686" in machine_type or "i386" in machine_type:
28
+ search_patterns = ['-linux-*-x86-*.so', '-linux-x86-*.so', '-x86-*.so']
17
29
  else:
18
- file_ext = '-amd64-*.so'
30
+ search_patterns = ['-linux-*.so', '*.so']
19
31
 
20
32
  root_dir = os.path.abspath(os.path.dirname(__file__))
21
33
  lib_dir = os.path.join(root_dir, 'dependencies')
22
34
  lib_path = None
23
- matches = glob(f'{root_dir}/dependencies/tls-client{file_ext}')
35
+
36
+ # Buscar biblioteca compatível tentando múltiplos padrões
37
+ matches = []
38
+ tried_patterns = []
39
+
40
+ for pattern_suffix in search_patterns:
41
+ search_pattern = f'{root_dir}/dependencies/tls-client{pattern_suffix}'
42
+ tried_patterns.append(f'tls-client{pattern_suffix}')
43
+ matches = glob(search_pattern)
44
+ if matches:
45
+ break
46
+
24
47
  if not matches:
25
- raise FileNotFoundError(f'No tls-client library found for the current platform: {platform} {machine()}')
48
+ # Listar arquivos disponíveis para debug
49
+ available_files = glob(f'{root_dir}/dependencies/tls-client*')
50
+ available_names = [os.path.basename(f) for f in available_files]
51
+
52
+ error_msg = (
53
+ f'Nenhuma biblioteca tls-client encontrada para a plataforma atual.\n'
54
+ f'Plataforma: {platform}\n'
55
+ f'Arquitetura: {machine()}\n'
56
+ f'Padrões testados: {tried_patterns}\n'
57
+ f'Arquivos disponíveis em dependencies/: {available_names}'
58
+ )
59
+ raise FileNotFoundError(error_msg)
26
60
 
61
+ # Carregar a primeira biblioteca encontrada
27
62
  library = ctypes.cdll.LoadLibrary(matches[0])
28
63
 
29
64
  # extract the exposed request function from the shared package
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: notify-tls-client
3
- Version: 2.0.2
3
+ Version: 2.0.3
4
4
  Summary: Cliente HTTP avançado com TLS fingerprinting, rotação automática de proxies e recuperação inteligente para web scraping profissional
5
5
  Author-email: Jeferson Albara <jeferson.albara@example.com>
6
6
  Maintainer-email: Jeferson Albara <jeferson.albara@example.com>
@@ -14,7 +14,7 @@ notify_tls_client/core/proxiesmanager/proxiesmanager.py,sha256=hcSw27wbt6UerJ5F8
14
14
  notify_tls_client/core/proxiesmanager/proxiesmanagerloader.py,sha256=7xr3SVdRnr95KWOdk15iehOCXG2huA-rY1j9VIe30YQ,1179
15
15
  notify_tls_client/tls_client/__init__.py,sha256=sThiIAzA650rfBlqZ_xalTjgTysUsjKua5ODnqyvhUE,669
16
16
  notify_tls_client/tls_client/__version__.py,sha256=32ZZ-ufGC9Yo6oPk5a1xig8YKJ2ZkRXnXoVqiqO0ptg,395
17
- notify_tls_client/tls_client/cffi.py,sha256=pedwBcQOwJvI66yp5GpyNU6zoqrQhTv3ocM1-1PtUm0,1291
17
+ notify_tls_client/tls_client/cffi.py,sha256=S8BQ5YOvphehia1CDmtEy_RNciw8F0wHNNLCNOZnnxg,3036
18
18
  notify_tls_client/tls_client/cookies.py,sha256=1fIOnFDMWMeXuAjQybSrUJXnyjhP-_jJ68AxBUZYgYU,15609
19
19
  notify_tls_client/tls_client/exceptions.py,sha256=xIoFb5H3Suk7XssQ-yw3I1DBkPLqnDXsiAe2MMp1qNQ,80
20
20
  notify_tls_client/tls_client/response.py,sha256=oMXdnbyppX5B1pYsk8h1UqZG01qHVOQCcnYrMG79ThI,2722
@@ -26,7 +26,7 @@ notify_tls_client/tls_client/dependencies/tls-client-darwin-amd64-1.12.0.dylib,s
26
26
  notify_tls_client/tls_client/dependencies/tls-client-linux-arm64-1.12.0.so,sha256=fQvdtCiRRS228WrFUE_ucq4OPC4Z7QU4_KI4B3Gf97Y,14404088
27
27
  notify_tls_client/tls_client/dependencies/tls-client-linux-ubuntu-amd64-1.12.0.so,sha256=UTvtZa93fWLWaSBINC_Cu8mNoLwsVdcQbQZsdQnZrJM,15210112
28
28
  notify_tls_client/tls_client/dependencies/tls-client-windows-64-1.12.0.dll,sha256=uk80UEGW8WepYMglh1Yo6VSrBSNDwon-OyFqE_1bWmM,24849278
29
- notify_tls_client-2.0.2.dist-info/METADATA,sha256=gf8TM2izyYQ_8Cs7BMPJvTHZlKLDmM1mPWwC-MuuQFI,10565
30
- notify_tls_client-2.0.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
31
- notify_tls_client-2.0.2.dist-info/top_level.txt,sha256=fq9YA0cFdpCuUO7cdMFN7oxm1zDfZm_m1KPXehUqA5o,18
32
- notify_tls_client-2.0.2.dist-info/RECORD,,
29
+ notify_tls_client-2.0.3.dist-info/METADATA,sha256=8jO38upUyUQm-ADHAjAI-PlS1XlCMLK5-CWX1f902eE,10565
30
+ notify_tls_client-2.0.3.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
31
+ notify_tls_client-2.0.3.dist-info/top_level.txt,sha256=fq9YA0cFdpCuUO7cdMFN7oxm1zDfZm_m1KPXehUqA5o,18
32
+ notify_tls_client-2.0.3.dist-info/RECORD,,