Metadata-Version: 2.4
Name: loki-cactus01
Version: 1.8.13
Summary: Utilities and scrapers toolkit
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.32.5
Requires-Dist: cryptography>=42.0
Provides-Extra: scrapers
Requires-Dist: beautifulsoup4>=4.14.3; extra == "scrapers"
Requires-Dist: quickjs>=1.19; extra == "scrapers"
Requires-Dist: curl_cffi>=0.12.0; extra == "scrapers"
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: twine>=6.0; extra == "dev"

# loki

一个可被其它项目复用的工具库（同时包含部分 scraper）。

## 作为依赖安装

**本地源码引用（推荐开发阶段）**

```bash
pip install -e .
```

**启用 scraper 相关依赖**

```bash
pip install -e ".[scrapers]"
```

Playwright 还需要安装浏览器（首次一次性）：

```bash
python -m playwright install chromium
```

## 在其它项目里引用

```python
from loki.scrapers import RequestMixin, Method
from loki.scrapers.javdb import JavDB
```

## 发布 / 构建

```bash
python scripts/release.py --dry-run     # 清理 dist/build、跑测试、build、twine check，不上传
python scripts/release.py               # 上传到 PyPI，上传前会确认
python scripts/release.py --yes         # CI/确认无误时直接上传
```

脚本会自动删除旧的 `dist/`、`build/`、`*.egg-info`，并在上传前检查当前版本是否已经存在于 PyPI；如果已存在，需要先提升 `pyproject.toml` 里的 `version`。

只想本地安装刚构建的 wheel 时，可先执行 dry-run，再安装：

```bash
pip install dist/loki_cactus01-*.whl
```

## 说明

- 依赖在 `pyproject.toml` 的 `[project.dependencies]` / `[project.optional-dependencies]` 中维护。
- 命令行入口 `loki` 指向 `loki.__main__:main`（目前仅做日志初始化）。
