Metadata-Version: 2.4
Name: sliprequests
Version: 0.2.0
Summary: requests 完全兼容的反检测爬虫库，基于 Camoufox 反检测浏览器
Home-page: https://github.com/violettoolssite/sliprequests
Author: violet
Author-email: violet <violettools.site@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/violettoolssite/sliprequests
Project-URL: Repository, https://github.com/violettoolssite/sliprequests
Project-URL: Issues, https://github.com/violettoolssite/sliprequests/issues
Keywords: scraping,anti-detection,camoufox,cloudflare,akamai,perimeterx,bot-detection,requests
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: camoufox[geoip]>=0.4.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# sliprequests

**requests 完全兼容的反检测爬虫库**

基于 [Camoufox](https://camoufox.com) 反检测浏览器，一行代码从 requests 迁移到高级反检测爬虫。

## 为什么用 sliprequests？

```python
# 之前用 requests（会遇到人机验证）
import requests
resp = requests.get("https://example.com")  # ❌ 被 Cloudflare 拦截

# 现在用 sliprequests（自动绕过反爬）
import sliprequests as requests
resp = requests.get("https://example.com")  # ✅ 正常获取
```

**零学习成本** — API 和 requests 完全一样，改一行 import 就行。

## 安装

```bash
pip install sliprequests
```

## 快速开始

```python
import sliprequests as requests

# GET 请求
resp = requests.get("https://httpbin.org/ip")
print(resp.json())

# POST 请求
resp = requests.post("https://httpbin.org/post", json={"name": "test"})

# 带参数
resp = requests.get("https://httpbin.org/get", params={"q": "test"})

# Session
with requests.Session() as s:
    s.get("https://example.com/login")
    resp = s.get("https://example.com/dashboard")
```

## 代理支持

```python
import sliprequests as requests

# Session 级别代理
with requests.Session() as s:
    s.proxies = {
        "http": "socks5://user:pass@host:port",
        "https": "socks5://user:pass@host:port",
    }
    resp = s.get("https://example.com")
```

## 支持的参数

所有 requests 参数完全兼容：

| 参数 | 说明 |
|------|------|
| `params` | URL 查询参数 |
| `data` | POST 表单数据 |
| `json` | JSON 数据 |
| `headers` | 请求头 |
| `cookies` | Cookies |
| `auth` | 认证 |
| `timeout` | 超时 |
| `proxies` | 代理 |
| `verify` | SSL 验证 |
| `cert` | 客户端证书 |
| `allow_redirects` | 重定向 |
| `stream` | 流式响应 |

## 反爬测试

| 网站 | 反爬系统 | 结果 |
|------|---------|------|
| Cloudflare | Cloudflare Bot Management | ✅ |
| eBay | PerimeterX | ✅ |
| Twitter/X | 自研反爬 | ✅ |
| LinkedIn | 自研反爬 | ✅ |
| Airbnb | 多层反爬 | ✅ |

## 系统要求

- Python >= 3.8
- Camoufox Browser Server 运行在 `localhost:9377`

## License

MIT
