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