MovieFinder CLI and MCP server for searching cached rrdynb movie resources.
Project description
moviefinder-cli
MovieFinder 会搜索 https://www.rrdynb.com,抓取搜索结果页和影片详情页,把结果缓存到本地 SQLite,并以 Markdown/JSON 返回给 CLI 或 Agent。
返回字段包括:
- 影片标题、详情页地址、分类、发布日期、海报
- 简介、豆瓣评分、IMDB 评分、IMDb ID
- 详情页中识别到的所有网盘地址,包括夸克、阿里、迅雷、百度等
- 提取码和 URL 中的
pwd参数
Agent / MCP 使用
发布到 PyPI 后,可以在 Claude Desktop 等 MCP 客户端中直接通过 uvx 启动:
{
"mcpServers": {
"moviefinder": {
"command": "uvx",
"args": [
"--refresh",
"--from",
"moviefinder-cli",
"moviefinder-mcp"
]
}
}
}
可用 MCP Tools:
search_movies(query, limit=5, refresh=false, output_format="markdown")movie_cache_stats(output_format="markdown")
安装
需要 Python 3.10+。
使用 uv 安装(推荐)
uv tool install moviefinder-cli
安装后即可使用:
moviefinder search 一一 --limit 3
使用 pip 安装
pip install moviefinder-cli
源码安装(本地开发)
python3 -m pip install -e .
命令行搜索
默认输出 Markdown:
moviefinder search 一一 --limit 3
也可以不安装,直接通过模块方式运行:
python3 -m moviefinder_cli search 一一 --limit 3
强制刷新缓存:
moviefinder search 一一 --limit 3 --refresh
保留 JSON 输出:
moviefinder search 一一 --limit 3 --format json
查看缓存统计:
moviefinder cache-stats
HTTP API
启动服务:
python3 -m moviefinder_cli serve --host 127.0.0.1 --port 8000
搜索:
curl 'http://127.0.0.1:8000/search?q=一一&limit=3'
强制刷新:
curl 'http://127.0.0.1:8000/search?q=一一&limit=3&refresh=1'
健康检查:
curl 'http://127.0.0.1:8000/health'
缓存统计:
curl 'http://127.0.0.1:8000/cache/stats'
缓存
默认缓存文件是 data/moviefinder.sqlite3,可以通过环境变量覆盖:
MOVIEFINDER_DB_PATH=/tmp/moviefinder.sqlite3 moviefinder search 一一
缓存策略:
- 搜索结果缓存 1 小时
- 影片详情缓存 7 天
- 搜索结果会复用影片详情缓存,避免同一详情页被重复抓取
- 如果远端临时返回 403/网络错误,CLI 会优先用同关键词缓存兜底,并在 Markdown/JSON 中标注
warning
返回示例
# 搜索结果:一一
- 来源:rrdynb
- 搜索页:[打开](https://www.rrdynb.com/plus/search.php?q=...)
- 结果数:1
- 缓存:命中
## 1. 《一一》百度云网盘下载.阿里云盘.国语中字.(2000)
| 字段 | 值 |
| --- | --- |
| 分类 | movie |
| 发布日期 | 2026-05-29 |
| 豆瓣评分 | 9.0 |
| IMDB 评分 | 8.1 |
| IMDb ID | tt0244316 |
| 详情页 | [打开](https://www.rrdynb.com/movie/2019/0216/3035.html) |
### 简介
电影《一一》讲述了...
### 网盘资源
| 平台 | 地址 | 提取码 | URL 密码 |
| --- | --- | --- | --- |
| 夸克网盘 | [打开](https://pan.quark.cn/s/...) | - | - |
测试
PYTHONPATH=src python3 -m unittest discover -s tests
发布
项目使用与 getnotes-cli 类似的发布模式:
uv build
uv publish
如果使用 GitHub Release 发布,则 .github/workflows/publish.yml 会通过 PyPI Trusted Publisher 自动发布。
注意
这个项目只读取公开页面并返回元数据和页面公开展示的网盘链接,不做登录绕过、验证码绕过或资源批量下载。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file moviefinder_cli-0.1.0.tar.gz.
File metadata
- Download URL: moviefinder_cli-0.1.0.tar.gz
- Upload date:
- Size: 123.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28aaab1578b8b0430ada5cb40755edebbc43c0ab64fbe6137664c16dc63fba3b
|
|
| MD5 |
db631107ef3564bc3d7828771d43a82c
|
|
| BLAKE2b-256 |
155910e600318d3bc7d2684cac8dac7b24a7ab8ccb40005a26dfddb3c18ebf2e
|
File details
Details for the file moviefinder_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: moviefinder_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
700920c20cd30b99bda3aacf3a1f6a4fee73cbf184d8bb1dac5c950a2a6c8b6e
|
|
| MD5 |
4544b7c00e2a96b060a195a8de02c8ec
|
|
| BLAKE2b-256 |
3eb553b724fc136b8bf637558c2f4c2c3c35eb640badb260a219b0df32adb3ad
|