tls-client-python 1.14.0__tar.gz → 1.15.0__tar.gz

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 (24) hide show
  1. {tls_client_python-1.14.0/tls_client_python.egg-info → tls_client_python-1.15.0}/PKG-INFO +7 -7
  2. {tls_client_python-1.14.0 → tls_client_python-1.15.0}/Readme.md +6 -6
  3. {tls_client_python-1.14.0 → tls_client_python-1.15.0}/pyproject.toml +0 -1
  4. {tls_client_python-1.14.0 → tls_client_python-1.15.0}/tls_client/__init__.py +5 -5
  5. {tls_client_python-1.14.0 → tls_client_python-1.15.0}/tls_client/_core.py +1312 -228
  6. tls_client_python-1.15.0/tls_client/_default_headers.py +347 -0
  7. tls_client_python-1.14.0/tls_client/bin/tls-client-linux-amd64.so → tls_client_python-1.15.0/tls_client/bin/tls-client-alpine-amd64.so +0 -0
  8. {tls_client_python-1.14.0 → tls_client_python-1.15.0}/tls_client/bin/tls-client-darwin-amd64.dylib +0 -0
  9. {tls_client_python-1.14.0 → tls_client_python-1.15.0}/tls_client/bin/tls-client-darwin-arm64.dylib +0 -0
  10. {tls_client_python-1.14.0 → tls_client_python-1.15.0}/tls_client/bin/tls-client-linux-386.so +0 -0
  11. tls_client_python-1.14.0/tls_client/bin/tls-client-alpine-amd64.so → tls_client_python-1.15.0/tls_client/bin/tls-client-linux-amd64.so +0 -0
  12. {tls_client_python-1.14.0 → tls_client_python-1.15.0}/tls_client/bin/tls-client-linux-arm.so +0 -0
  13. {tls_client_python-1.14.0 → tls_client_python-1.15.0}/tls_client/bin/tls-client-linux-arm64.so +0 -0
  14. {tls_client_python-1.14.0 → tls_client_python-1.15.0}/tls_client/bin/tls-client-windows-386.dll +0 -0
  15. {tls_client_python-1.14.0 → tls_client_python-1.15.0}/tls_client/bin/tls-client-windows-amd64.dll +0 -0
  16. {tls_client_python-1.14.0 → tls_client_python-1.15.0/tls_client_python.egg-info}/PKG-INFO +7 -7
  17. {tls_client_python-1.14.0 → tls_client_python-1.15.0}/tls_client_python.egg-info/SOURCES.txt +1 -0
  18. {tls_client_python-1.14.0 → tls_client_python-1.15.0}/LICENSE +0 -0
  19. {tls_client_python-1.14.0 → tls_client_python-1.15.0}/MANIFEST.in +0 -0
  20. {tls_client_python-1.14.0 → tls_client_python-1.15.0}/setup.cfg +0 -0
  21. {tls_client_python-1.14.0 → tls_client_python-1.15.0}/tls_client_python.egg-info/dependency_links.txt +0 -0
  22. {tls_client_python-1.14.0 → tls_client_python-1.15.0}/tls_client_python.egg-info/not-zip-safe +0 -0
  23. {tls_client_python-1.14.0 → tls_client_python-1.15.0}/tls_client_python.egg-info/requires.txt +0 -0
  24. {tls_client_python-1.14.0 → tls_client_python-1.15.0}/tls_client_python.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tls-client-python
3
- Version: 1.14.0
3
+ Version: 1.15.0
4
4
  Summary: High-performance Python binding for bogdanfinn/tls-client via CFFI – zero-copy, panic-proof, full TLS fingerprint control
5
5
  Author: komAAmok
6
6
  License: MIT
@@ -96,14 +96,14 @@ from tls_client import Session
96
96
  session = Session(client_identifier="chrome_146")
97
97
 
98
98
  # GET request
99
- resp = session.get("https://httpbin.org/get")
99
+ resp = session.get("https://tls.browserleaks.com/json")
100
100
  print(resp.status_code) # 200
101
101
  print(resp.text) # JSON body
102
102
  print(resp.used_protocol) # "HTTP/2.0"
103
103
 
104
104
  # POST with JSON
105
105
  resp = session.post(
106
- "https://httpbin.org/post",
106
+ "https://tls.browserleaks.com/json",
107
107
  body=b'{"hello":"world"}',
108
108
  headers={"Content-Type": "application/json"}
109
109
  )
@@ -115,7 +115,7 @@ print(data["json"]) # {"hello": "world"}
115
115
 
116
116
  ```python
117
117
  with Session(client_identifier="safari_ios_18_5") as s:
118
- resp = s.get("https://www.example.com")
118
+ resp = s.get("https://tls.browserleaks.com/json")
119
119
  print(resp.status_code)
120
120
  ```
121
121
 
@@ -127,7 +127,7 @@ from tls_client import AsyncSession
127
127
 
128
128
  async def main():
129
129
  async with AsyncSession(client_identifier="firefox_148") as s:
130
- resp = await s.get("https://httpbin.org/get")
130
+ resp = await s.get("https://tls.browserleaks.com/json")
131
131
  print(resp.json())
132
132
 
133
133
  asyncio.run(main())
@@ -289,7 +289,7 @@ session = Session(
289
289
 
290
290
  ```python
291
291
  resp = session.stream_to_file(
292
- "GET", "https://httpbin.org/image/png",
292
+ "GET", "https://tls.browserleaks.com/",
293
293
  output_path="/tmp/image.png"
294
294
  )
295
295
  print(resp.status_code) # response metadata still available
@@ -302,7 +302,7 @@ All `Session` constructor parameters can be overridden per request:
302
302
  ```python
303
303
  s = Session(client_identifier="chrome_146")
304
304
  # Override fingerprint for a single request
305
- resp = s.get("https://tls.peet.ws/api/all", client_identifier="firefox_148")
305
+ resp = s.get("https://tls.browserleaks.com/json", client_identifier="firefox_148")
306
306
  ```
307
307
 
308
308
  ---
@@ -61,14 +61,14 @@ from tls_client import Session
61
61
  session = Session(client_identifier="chrome_146")
62
62
 
63
63
  # GET request
64
- resp = session.get("https://httpbin.org/get")
64
+ resp = session.get("https://tls.browserleaks.com/json")
65
65
  print(resp.status_code) # 200
66
66
  print(resp.text) # JSON body
67
67
  print(resp.used_protocol) # "HTTP/2.0"
68
68
 
69
69
  # POST with JSON
70
70
  resp = session.post(
71
- "https://httpbin.org/post",
71
+ "https://tls.browserleaks.com/json",
72
72
  body=b'{"hello":"world"}',
73
73
  headers={"Content-Type": "application/json"}
74
74
  )
@@ -80,7 +80,7 @@ print(data["json"]) # {"hello": "world"}
80
80
 
81
81
  ```python
82
82
  with Session(client_identifier="safari_ios_18_5") as s:
83
- resp = s.get("https://www.example.com")
83
+ resp = s.get("https://tls.browserleaks.com/json")
84
84
  print(resp.status_code)
85
85
  ```
86
86
 
@@ -92,7 +92,7 @@ from tls_client import AsyncSession
92
92
 
93
93
  async def main():
94
94
  async with AsyncSession(client_identifier="firefox_148") as s:
95
- resp = await s.get("https://httpbin.org/get")
95
+ resp = await s.get("https://tls.browserleaks.com/json")
96
96
  print(resp.json())
97
97
 
98
98
  asyncio.run(main())
@@ -254,7 +254,7 @@ session = Session(
254
254
 
255
255
  ```python
256
256
  resp = session.stream_to_file(
257
- "GET", "https://httpbin.org/image/png",
257
+ "GET", "https://tls.browserleaks.com/",
258
258
  output_path="/tmp/image.png"
259
259
  )
260
260
  print(resp.status_code) # response metadata still available
@@ -267,7 +267,7 @@ All `Session` constructor parameters can be overridden per request:
267
267
  ```python
268
268
  s = Session(client_identifier="chrome_146")
269
269
  # Override fingerprint for a single request
270
- resp = s.get("https://tls.peet.ws/api/all", client_identifier="firefox_148")
270
+ resp = s.get("https://tls.browserleaks.com/json", client_identifier="firefox_148")
271
271
  ```
272
272
 
273
273
  ---
@@ -31,7 +31,6 @@ classifiers = [
31
31
  "Operating System :: Microsoft :: Windows",
32
32
  "Operating System :: POSIX :: Linux",
33
33
  "Programming Language :: Python :: 3",
34
- # 🌟 完美覆盖 3.6 - 3.12
35
34
  "Programming Language :: Python :: 3.6",
36
35
  "Programming Language :: Python :: 3.7",
37
36
  "Programming Language :: Python :: 3.8",
@@ -26,9 +26,9 @@ from tls_client._core import (
26
26
  Session,
27
27
  Request,
28
28
  Response,
29
+ ClientIdentifiers,
30
+ ClientIdentifiers,
29
31
  clear_client_pool,
30
- SUPPORTED_CLIENT_IDENTIFIERS,
31
- list_client_identifiers,
32
32
  )
33
33
 
34
34
  __all__ = [
@@ -36,8 +36,8 @@ __all__ = [
36
36
  "AsyncSession",
37
37
  "Request",
38
38
  "Response",
39
+ "ClientIdentifiers",
40
+ "ClientIdentifiers",
39
41
  "clear_client_pool",
40
- "SUPPORTED_CLIENT_IDENTIFIERS",
41
- "list_client_identifiers",
42
42
  ]
43
- __version__ = "1.14.0"
43
+ __version__ = "1.15.0"