notify-tls-client 0.1.9__py3-none-any.whl → 2.0.1__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.
@@ -0,0 +1,338 @@
1
+ Metadata-Version: 2.4
2
+ Name: notify-tls-client
3
+ Version: 2.0.1
4
+ Summary: Cliente HTTP avançado com TLS fingerprinting, rotação automática de proxies e recuperação inteligente para web scraping profissional
5
+ Author-email: Jeferson Albara <jeferson.albara@example.com>
6
+ Maintainer-email: Jeferson Albara <jeferson.albara@example.com>
7
+ License: MIT
8
+ Project-URL: Homepage, https://github.com/jefersonAlbara/notify-tls-client
9
+ Project-URL: Documentation, https://github.com/jefersonAlbara/notify-tls-client#readme
10
+ Project-URL: Repository, https://github.com/jefersonAlbara/notify-tls-client
11
+ Project-URL: Issues, https://github.com/jefersonAlbara/notify-tls-client/issues
12
+ Project-URL: Changelog, https://github.com/jefersonAlbara/notify-tls-client/blob/main/CHANGELOG.md
13
+ Keywords: tls-client,http-client,web-scraping,proxy-rotation,tls-fingerprinting,browser-emulation,http2,http3,requests,automation
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Internet :: WWW/HTTP
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Classifier: Topic :: Internet :: Proxy Servers
23
+ Classifier: Operating System :: OS Independent
24
+ Classifier: Typing :: Typed
25
+ Requires-Python: >=3.12
26
+ Description-Content-Type: text/markdown
27
+ Requires-Dist: dataclasses-json>=0.6.0
28
+ Requires-Dist: typing-extensions>=4.8.0
29
+ Requires-Dist: orjson>=3.9.0
30
+ Provides-Extra: dev
31
+ Requires-Dist: pytest>=7.4.0; extra == "dev"
32
+ Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
33
+ Requires-Dist: black>=23.0.0; extra == "dev"
34
+ Requires-Dist: mypy>=1.5.0; extra == "dev"
35
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
36
+
37
+ # Notify TLS Client
38
+
39
+ [![PyPI version](https://badge.fury.io/py/notify-tls-client.svg)](https://badge.fury.io/py/notify-tls-client)
40
+ [![Python Version](https://img.shields.io/pypi/pyversions/notify-tls-client.svg)](https://pypi.org/project/notify-tls-client/)
41
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
42
+
43
+ Cliente HTTP avançado em Python com suporte a TLS/SSL customizado, fingerprinting de navegadores e rotação automática de proxies. Construído sobre a biblioteca `tls-client` com funcionalidades adicionais para web scraping e automação resiliente.
44
+
45
+ ## 🚀 Características Principais
46
+
47
+ - **Fingerprinting TLS Avançado**: Emula múltiplos navegadores (Chrome, Firefox, Safari, Edge, Mobile)
48
+ - **Rotação Automática**: Proxies e client identifiers com políticas configuráveis
49
+ - **Recuperação Automática**: Reconexão inteligente em erros e respostas proibidas
50
+ - **Thread-Safe**: Uso seguro em ambientes multi-threaded
51
+ - **Configuração Modular**: Sistema de configuração baseado em objetos reutilizáveis
52
+ - **Presets Prontos**: Configurações pré-definidas para casos de uso comuns
53
+ - **HTTP/3 Support**: Suporte opcional a QUIC/HTTP3
54
+
55
+ ## 📦 Instalação
56
+
57
+ ```bash
58
+ pip install notify-tls-client
59
+ ```
60
+
61
+ ### Requisitos
62
+
63
+ - Python >= 3.12
64
+ - Sistema operacional: Windows, macOS, Linux (x86_64, ARM64)
65
+
66
+ ## 🎯 Quick Start
67
+
68
+ ### Uso Básico
69
+
70
+ ```python
71
+ from notify_tls_client import NotifyTLSClient
72
+
73
+ # Cliente com configuração padrão
74
+ client = NotifyTLSClient()
75
+
76
+ # Fazer requisição
77
+ response = client.get("https://api.example.com/data")
78
+ print(response.status_code)
79
+ print(response.json())
80
+ ```
81
+
82
+ ### Usando Presets (Recomendado)
83
+
84
+ ```python
85
+ from notify_tls_client import NotifyTLSClient
86
+ from notify_tls_client.config import ClientConfiguration
87
+ from notify_tls_client.core.proxiesmanager import ProxiesManagerLoader
88
+
89
+ # Carregar proxies
90
+ proxies = ProxiesManagerLoader().from_txt("proxies.txt")
91
+
92
+ # Preset para scraping agressivo
93
+ config = ClientConfiguration.aggressive(proxies)
94
+ client = NotifyTLSClient(config)
95
+
96
+ # Fazer múltiplas requisições
97
+ for i in range(100):
98
+ response = client.get("https://example.com/api/endpoint")
99
+ print(f"Request {i}: {response.status_code}")
100
+ ```
101
+
102
+ ### Configuração Customizada
103
+
104
+ ```python
105
+ from notify_tls_client import NotifyTLSClient
106
+ from notify_tls_client.config import (
107
+ ClientConfiguration,
108
+ RotationConfig,
109
+ RecoveryConfig,
110
+ ClientConfig
111
+ )
112
+
113
+ config = ClientConfiguration(
114
+ proxies_manager=proxies,
115
+ rotation=RotationConfig(
116
+ requests_limit_same_proxy=50,
117
+ requests_limit_same_client_identifier=200,
118
+ random_tls_extension_order=True
119
+ ),
120
+ recovery=RecoveryConfig(
121
+ instantiate_new_client_on_forbidden_response=True,
122
+ instantiate_new_client_on_exception=True,
123
+ change_client_identifier_on_forbidden_response=True,
124
+ status_codes_to_forbidden_response_handle=[403, 429, 503]
125
+ ),
126
+ client=ClientConfig(
127
+ client_identifiers=["chrome_133", "firefox_120", "safari_17_0"],
128
+ disable_http3=False,
129
+ debug_mode=False
130
+ )
131
+ )
132
+
133
+ client = NotifyTLSClient(config)
134
+ ```
135
+
136
+ ## 📚 Presets Disponíveis
137
+
138
+ ### Simple
139
+ Uso básico com rotação de proxies padrão.
140
+ ```python
141
+ config = ClientConfiguration.simple(proxies)
142
+ ```
143
+
144
+ ### Aggressive
145
+ Para scraping intensivo com recuperação automática completa.
146
+ ```python
147
+ config = ClientConfiguration.aggressive(proxies)
148
+ ```
149
+ - Troca proxy a cada 10 requisições
150
+ - Troca client identifier a cada 50 requisições
151
+ - Recuperação automática em erros e 403/429/503
152
+ - Múltiplos client identifiers
153
+
154
+ ### Stealth
155
+ Foco em evitar detecção através de diversidade.
156
+ ```python
157
+ config = ClientConfiguration.stealth(proxies)
158
+ ```
159
+ - 4 client identifiers diferentes
160
+ - Ordem de extensões TLS randomizada
161
+ - Rotação moderada (100 req/proxy)
162
+
163
+ ### Mobile
164
+ Simula dispositivos móveis.
165
+ ```python
166
+ # Android
167
+ config = ClientConfiguration.mobile(proxies, platform="android")
168
+
169
+ # iOS
170
+ config = ClientConfiguration.mobile(proxies, platform="ios")
171
+ ```
172
+
173
+ ## 🔧 Funcionalidades Avançadas
174
+
175
+ ### Rotação de Proxies
176
+
177
+ ```python
178
+ from notify_tls_client.core.proxiesmanager import ProxiesManagerLoader
179
+
180
+ # Carregar de arquivo
181
+ proxies = ProxiesManagerLoader().from_txt("proxies.txt")
182
+
183
+ # Formato do arquivo (um por linha):
184
+ # host:port
185
+ # host:port:username:password
186
+ # http://username:password@host:port
187
+ ```
188
+
189
+ ### Client Identifiers Suportados
190
+
191
+ **Desktop:**
192
+ - Chrome: `chrome_133`, `chrome_131`, `chrome_120`, etc.
193
+ - Firefox: `firefox_120`, `firefox_117`, `firefox_110`, etc.
194
+ - Safari: `safari_17_0`, `safari_16_0`, etc.
195
+ - Edge, Opera
196
+
197
+ **Mobile:**
198
+ - Android: `okhttp4_android_13`, `okhttp4_android_12`, etc.
199
+ - iOS: `safari_ios_16_0`, `safari_ios_15_6`, etc.
200
+
201
+ ### Recuperação Automática
202
+
203
+ ```python
204
+ config = ClientConfiguration(
205
+ recovery=RecoveryConfig(
206
+ # Criar nova sessão em respostas proibidas
207
+ instantiate_new_client_on_forbidden_response=True,
208
+
209
+ # Criar nova sessão em exceções
210
+ instantiate_new_client_on_exception=True,
211
+
212
+ # Trocar identifier em respostas proibidas
213
+ change_client_identifier_on_forbidden_response=True,
214
+
215
+ # Status codes que acionam recuperação
216
+ status_codes_to_forbidden_response_handle=[403, 429, 503]
217
+ )
218
+ )
219
+ ```
220
+
221
+ ### Headers Customizados
222
+
223
+ ```python
224
+ config = ClientConfiguration(
225
+ client=ClientConfig(
226
+ default_headers={
227
+ "User-Agent": "Mozilla/5.0...",
228
+ "Accept-Language": "pt-BR,pt;q=0.9",
229
+ "Custom-Header": "value"
230
+ }
231
+ )
232
+ )
233
+
234
+ # Ou por requisição
235
+ response = client.get(
236
+ "https://example.com",
237
+ headers={"Authorization": "Bearer token"}
238
+ )
239
+ ```
240
+
241
+ ### Cookies
242
+
243
+ ```python
244
+ # Obter todos os cookies
245
+ cookies = client.get_cookies()
246
+
247
+ # Obter cookie específico
248
+ value = client.get_cookie_by_name("session_id")
249
+
250
+ # Definir cookie
251
+ client.set_cookie("name", "value")
252
+ ```
253
+
254
+ ## 🔒 Thread Safety
255
+
256
+ A biblioteca é thread-safe e pode ser usada em ambientes multi-threaded:
257
+
258
+ ```python
259
+ import concurrent.futures
260
+
261
+ client = NotifyTLSClient(ClientConfiguration.aggressive(proxies))
262
+
263
+ def make_request(url):
264
+ return client.get(url)
265
+
266
+ with concurrent.futures.ThreadPoolExecutor(max_workers=10) as executor:
267
+ urls = ["https://example.com"] * 100
268
+ results = list(executor.map(make_request, urls))
269
+ ```
270
+
271
+ ## 📊 Logging
272
+
273
+ ```python
274
+ import logging
275
+
276
+ # Habilitar logs de debug
277
+ logging.basicConfig(level=logging.DEBUG)
278
+
279
+ # Ou configurar apenas para notify_tls_client
280
+ logger = logging.getLogger("notify_tls_client")
281
+ logger.setLevel(logging.DEBUG)
282
+ ```
283
+
284
+ ## 🛠️ Métodos HTTP Suportados
285
+
286
+ ```python
287
+ # GET
288
+ response = client.get(url, params={"key": "value"})
289
+
290
+ # POST
291
+ response = client.post(url, json={"data": "value"})
292
+ response = client.post(url, data="form data")
293
+
294
+ # PUT
295
+ response = client.put(url, json={"data": "value"})
296
+
297
+ # PATCH
298
+ response = client.patch(url, json={"data": "value"})
299
+
300
+ # DELETE
301
+ response = client.delete(url)
302
+ ```
303
+
304
+ ## 📖 Documentação Completa
305
+
306
+ Para documentação detalhada sobre arquitetura, componentes internos e exemplos avançados, consulte:
307
+ - [CLAUDE.md](CLAUDE.md) - Guia completo de desenvolvimento
308
+ - [examples/](examples/) - Exemplos de código
309
+
310
+ ## 🤝 Contribuindo
311
+
312
+ Contribuições são bem-vindas! Por favor, leia [CONTRIBUTING.md](CONTRIBUTING.md) para detalhes sobre nosso código de conduta e processo de submissão de pull requests.
313
+
314
+ ## 📝 Changelog
315
+
316
+ Veja [CHANGELOG.md](CHANGELOG.md) para histórico de versões e mudanças.
317
+
318
+ ## 📄 Licença
319
+
320
+ Este projeto está licenciado sob a Licença MIT - veja o arquivo [LICENSE](LICENSE) para detalhes.
321
+
322
+ ## ⚠️ Aviso Legal
323
+
324
+ Esta biblioteca é fornecida apenas para fins educacionais e de pesquisa. O uso desta ferramenta para violar termos de serviço de websites, realizar scraping não autorizado ou qualquer atividade ilegal é de sua responsabilidade. Os desenvolvedores não se responsabilizam pelo uso indevido desta biblioteca.
325
+
326
+ ## 🙏 Agradecimentos
327
+
328
+ - [tls-client](https://github.com/bogdanfinn/tls-client) - Biblioteca Go subjacente para TLS fingerprinting
329
+ - Comunidade Python por ferramentas e bibliotecas incríveis
330
+
331
+ ## 📞 Suporte
332
+
333
+ - **Issues**: [GitHub Issues](https://github.com/jefersonAlbara/notify-tls-client/issues)
334
+ - **Discussões**: [GitHub Discussions](https://github.com/jefersonAlbara/notify-tls-client/discussions)
335
+
336
+ ---
337
+
338
+ **Desenvolvido com ❤️ para a comunidade Python**
@@ -1,19 +1,24 @@
1
1
  notify_tls_client/__init__.py,sha256=APA8wxvkGYZiVMMbTWGo7prB3iKE-OzUajd0bfc8PwE,84
2
+ notify_tls_client/config/__init__.py,sha256=2xsw7M2E8-ncpIDySYcgH500xAnYyO3qy3PRXkP2inQ,495
3
+ notify_tls_client/config/client_config.py,sha256=Fwg6LS1zP8XFRPbTxNj2svCqeWh2GJcqrq7hnpQtYRQ,2837
4
+ notify_tls_client/config/client_configuration.py,sha256=Zl71lxZSKU7oVJwnHPSYV9uufk2IgFtHW3u9deqo5HU,9103
5
+ notify_tls_client/config/recovery_config.py,sha256=zKBjSdCHJ4iF0PXUawPh3EktOxGdn-8bzpjl7LOIoa4,3202
6
+ notify_tls_client/config/rotation_config.py,sha256=Av_K6BzgPknFYZXxe9WmDra8VGI9JEpDJSm0dDs8QqM,2089
2
7
  notify_tls_client/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- notify_tls_client/core/client_identifiers_manager.py,sha256=-JKAGR9tbBI60PNVokfGUTJ5DeD94geGAkBiwB45HHU,1355
4
- notify_tls_client/core/notifytlsclient.py,sha256=SORwwDsqaV3mdNWjM8SaT17bjEgOazlIqNB41mE2lRo,8247
8
+ notify_tls_client/core/client_identifiers_manager.py,sha256=D8xJ89aaxZ_8Pssx9VqEH05G8cp3bMez14-KrTMtJiU,1646
9
+ notify_tls_client/core/notifytlsclient.py,sha256=CcDS-yFj5g3Vw-mtbu_AFXZZD7wDjyPF_P5ha4vysqo,13307
5
10
  notify_tls_client/core/client/__init__.py,sha256=VKjpq02hC-r9ER6mbfkwG6W2ybv_jND9d9bidte0CjU,51
6
- notify_tls_client/core/client/decorators.py,sha256=WYwWwodgmz3PhExz873Tta86j9Jic5wLleCZBfpBMFI,10528
11
+ notify_tls_client/core/client/decorators.py,sha256=TMKHLkWuVUy802TzY3iLwR1WV9QymcCxCelzBocPJH0,9705
7
12
  notify_tls_client/core/proxiesmanager/__init__.py,sha256=emF4vnZvSfb9zlHkt9dDdTcGwkfs1DADi7XVw_DxsWs,105
8
- notify_tls_client/core/proxiesmanager/proxiesmanager.py,sha256=6jb1RFUCD3zUDzmk4_t9oUj_aQAbwgdvJkNxLUzkgWM,1838
13
+ notify_tls_client/core/proxiesmanager/proxiesmanager.py,sha256=kfW7nEIyeXtDj1YzaAZo2ctPGMk3MnNIXV15Cj7iiY0,3010
9
14
  notify_tls_client/core/proxiesmanager/proxiesmanagerloader.py,sha256=7xr3SVdRnr95KWOdk15iehOCXG2huA-rY1j9VIe30YQ,1179
10
15
  notify_tls_client/tls_client/__init__.py,sha256=sThiIAzA650rfBlqZ_xalTjgTysUsjKua5ODnqyvhUE,669
11
16
  notify_tls_client/tls_client/__version__.py,sha256=32ZZ-ufGC9Yo6oPk5a1xig8YKJ2ZkRXnXoVqiqO0ptg,395
12
- notify_tls_client/tls_client/cffi.py,sha256=Ar7cuCJVz7-RcPBhsKg-xe6ThvlcLQPvXwR-688vMyM,1224
17
+ notify_tls_client/tls_client/cffi.py,sha256=pedwBcQOwJvI66yp5GpyNU6zoqrQhTv3ocM1-1PtUm0,1291
13
18
  notify_tls_client/tls_client/cookies.py,sha256=1fIOnFDMWMeXuAjQybSrUJXnyjhP-_jJ68AxBUZYgYU,15609
14
19
  notify_tls_client/tls_client/exceptions.py,sha256=xIoFb5H3Suk7XssQ-yw3I1DBkPLqnDXsiAe2MMp1qNQ,80
15
- notify_tls_client/tls_client/response.py,sha256=6oxMRPDkLhiNghSSB7HRC58-gcGClnJ-Nh4o53ETnYA,2586
16
- notify_tls_client/tls_client/sessions.py,sha256=dLU_kSt5h7NcQeOEpaEIbraUaTXeLiVbHRGZebAqyfY,19142
20
+ notify_tls_client/tls_client/response.py,sha256=v4mQhZroNL9203mA5KDJvxSP4GntVq0sjYRtJNfIoE0,2732
21
+ notify_tls_client/tls_client/sessions.py,sha256=1xeUDR9H42wS900mCzkpu4At7Lx1O07QGoDuThbLG0M,19233
17
22
  notify_tls_client/tls_client/settings.py,sha256=x_2Vrph-QebbCjkxmnX8UPd5oYYU4ClqPOpfoqelno4,1485
18
23
  notify_tls_client/tls_client/structures.py,sha256=md-tJmo8X5bad0KrMUTVN8jxUIvui7NiBxaf10bLULU,2517
19
24
  notify_tls_client/tls_client/dependencies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -21,7 +26,7 @@ notify_tls_client/tls_client/dependencies/tls-client-darwin-amd64-1.12.0.dylib,s
21
26
  notify_tls_client/tls_client/dependencies/tls-client-linux-arm64-1.12.0.so,sha256=fQvdtCiRRS228WrFUE_ucq4OPC4Z7QU4_KI4B3Gf97Y,14404088
22
27
  notify_tls_client/tls_client/dependencies/tls-client-linux-ubuntu-amd64-1.12.0.so,sha256=UTvtZa93fWLWaSBINC_Cu8mNoLwsVdcQbQZsdQnZrJM,15210112
23
28
  notify_tls_client/tls_client/dependencies/tls-client-windows-64-1.12.0.dll,sha256=uk80UEGW8WepYMglh1Yo6VSrBSNDwon-OyFqE_1bWmM,24849278
24
- notify_tls_client-0.1.9.dist-info/METADATA,sha256=RyJBSFemDSfLwjQsTfM1-gC0fZ17IUQcnJ-DaKITpPM,465
25
- notify_tls_client-0.1.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
26
- notify_tls_client-0.1.9.dist-info/top_level.txt,sha256=fq9YA0cFdpCuUO7cdMFN7oxm1zDfZm_m1KPXehUqA5o,18
27
- notify_tls_client-0.1.9.dist-info/RECORD,,
29
+ notify_tls_client-2.0.1.dist-info/METADATA,sha256=Fk4CucsgT0kffRjqOMLZQ1eFFDAU0Z3yg1YMCMdcdI4,10565
30
+ notify_tls_client-2.0.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
31
+ notify_tls_client-2.0.1.dist-info/top_level.txt,sha256=fq9YA0cFdpCuUO7cdMFN7oxm1zDfZm_m1KPXehUqA5o,18
32
+ notify_tls_client-2.0.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,14 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: notify_tls_client
3
- Version: 0.1.9
4
- Summary: Sem descrição
5
- Author-email: Naruto Uzumaki <naruto_uzumaki@gmail.com>
6
- License-Expression: MIT
7
- Project-URL: Homepage, https://github.com/jefersonAlbara/notify-tls-client
8
- Requires-Python: >=3.12
9
- Description-Content-Type: text/markdown
10
- Requires-Dist: dataclasses_json
11
- Requires-Dist: typing_extensions
12
-
13
- # MY TLS Client
14
- Pacote python privado com modificações na classe 'tls client'