|
1 | | -# tls-requests |
| 1 | +# TLS REQUESTS |
| 2 | +**A powerful and lightweight Python library for making secure and reliable HTTP/TLS fingerprint requests.** |
| 3 | + |
| 4 | +* * * |
| 5 | + |
| 6 | +**Installation** |
| 7 | +---------------- |
| 8 | + |
| 9 | +Install TLS Requests using pip: |
| 10 | + |
| 11 | +```shell |
| 12 | +pip install tls-requests |
| 13 | +``` |
| 14 | + |
| 15 | +### Quick Start |
| 16 | + |
| 17 | +Start using TLS Requests with just a few lines of code: |
| 18 | + |
| 19 | +```pycon |
| 20 | +>>> import tls_requests |
| 21 | +>>> r = tls_requests.get("https://httpbin.org/get") |
| 22 | +>>> r |
| 23 | +<Response [200 OK]> |
| 24 | +>>> r.status_code |
| 25 | +200 |
| 26 | +``` |
| 27 | + |
| 28 | +* * * |
| 29 | + |
| 30 | +**Introduction** |
| 31 | +---------------- |
| 32 | + |
| 33 | +**TLS Requests** is a cutting-edge HTTP client for Python, offering a feature-rich, |
| 34 | +highly configurable alternative to the popular [`requests`](https://github.com/psf/requests) library. |
| 35 | + |
| 36 | +It is built on top of [`tls-client`](https://github.com/bogdanfinn/tls-client), |
| 37 | +combining ease of use with advanced functionality for secure networking. |
| 38 | + |
| 39 | +**Acknowledgment**: A big thank you to all contributors for their support! |
| 40 | + |
| 41 | +### **Key Benefits** |
| 42 | + |
| 43 | +* **Bypass TLS Fingerprinting:** Mimic browser-like behaviors to navigate sophisticated anti-bot systems. |
| 44 | +* **Customizable TLS Clients:** Select specific TLS fingerprints to meet your needs. |
| 45 | +* **Ideal for Developers:** Build scrapers, API clients, or other custom networking tools effortlessly. |
| 46 | + |
| 47 | +* * * |
| 48 | + |
| 49 | +**Why Use TLS Requests?** |
| 50 | +------------------------- |
| 51 | + |
| 52 | +Modern websites increasingly use **TLS Fingerprinting** and anti-bot tools like Cloudflare Bot Fight Mode to block web crawlers. |
| 53 | + |
| 54 | +**TLS Requests** bypasses these obstacles by mimicking browser-like TLS behaviors, |
| 55 | +making it easy to scrape data or interact with websites that use sophisticated anti-bot measures. |
| 56 | + |
| 57 | +### Cloudflare Bot Fight Mode |
| 58 | + |
| 59 | + |
| 60 | +### Unlock Content Behind Cloudflare Bot Fight Mode |
| 61 | + |
| 62 | +**Example Code:** |
| 63 | + |
| 64 | +```pycon |
| 65 | +>>> import tls_requests |
| 66 | +>>> r = tls_requests.get('https://www.coingecko.com/') |
| 67 | +>>> r |
| 68 | +<Response [200]> |
| 69 | +``` |
| 70 | +* * * |
| 71 | + |
| 72 | +**Key Features** |
| 73 | +---------------- |
| 74 | + |
| 75 | +### **Enhanced Capabilities** |
| 76 | + |
| 77 | +* **Browser-like TLS Fingerprinting**: Enables secure and reliable browser-mimicking connections. |
| 78 | +* **High-Performance Backend**: Built on a Go-based HTTP backend for speed and efficiency. |
| 79 | +* **Synchronous & Asynchronous Support**: Seamlessly switch between synchronous and [asynchronous requests](https://github.com/thewebscraping/tls-requests/blob/main/docs/advanced/async_client). |
| 80 | +* **Protocol Support**: Fully compatible with HTTP/1.1 and HTTP/2. |
| 81 | +* **Strict Timeouts**: Reliable timeout management for precise control over request durations. |
| 82 | + |
| 83 | +### **Additional Features** |
| 84 | + |
| 85 | +* **Internationalized Domain & URL Support**: Handles non-ASCII URLs effortlessly. |
| 86 | +* **Cookie Management**: Ensures session-based cookie persistence. |
| 87 | +* **Authentication**: Native support for Basic and Function authentication. |
| 88 | +* **Content Decoding**: Automatic handling of gzip and brotli-encoded responses. |
| 89 | +* **Hooks**: Perfect for logging, monitoring, tracing, or pre/post-processing requests and responses. |
| 90 | +* **Unicode Support**: Effortlessly process Unicode response bodies. |
| 91 | +* **File Uploads**: Simplified multipart file upload support. |
| 92 | +* **Proxy Configuration**: Supports Socks5, HTTP, and HTTPS proxies for enhanced privacy. |
| 93 | + |
| 94 | +* * * |
| 95 | + |
| 96 | +**Documentation** |
| 97 | +----------------- |
| 98 | + |
| 99 | +Explore the full capabilities of TLS Requests in the documentation: |
| 100 | + |
| 101 | +* **[Quickstart Guide](https://github.com/thewebscraping/tls-requests/blob/main/docs/quickstart.md)**: A beginner-friendly guide. |
| 102 | +* **Advanced Topics**: Learn to leverage specialized features. |
| 103 | +* **[Async Support](https://github.com/thewebscraping/tls-requests/blob/main/docs/docs/advanced/async_client)**: Handle high-concurrency scenarios. |
| 104 | +* **Custom TLS Configurations**: |
| 105 | + * **[Wrapper TLS Client](https://github.com/thewebscraping/tls-requests/blob/main/docs/docs/tls/index)** |
| 106 | + * **[TLS Client Profiles](https://github.com/thewebscraping/tls-requests/blob/main/docs/docs/tls/profiles)** |
| 107 | + * **[Custom TLS Configurations](https://github.com/thewebscraping/tls-requests/blob/main/docs/docs/tls/configuration)** |
| 108 | + |
| 109 | +* * * |
0 commit comments