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