Skip to main content

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 自动发布。

注意

这个项目只读取公开页面并返回元数据和页面公开展示的网盘链接,不做登录绕过、验证码绕过或资源批量下载。

Metadata

Release files for moviefinder-cli 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for moviefinder-cli 0.1.0
File Size Uploaded Provenance Actions
moviefinder_cli-0.1.0.tar.gz 123.2 kB Without provenance Details for moviefinder_cli-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for moviefinder-cli 0.1.0
File Interpreter ABI Platform Actions
moviefinder_cli-0.1.0-py3-none-any.whl Python 3 none any Details for moviefinder_cli-0.1.0-py3-none-any.whl

Total release size: 140.9 kB

Release files / moviefinder_cli-0.1.0.tar.gz

Download URL moviefinder_cli-0.1.0.tar.gz
Size 123.2 kB
Tags Source
SHA-256 checksum
How to use checksums
28aaab1578b8b0430ada5cb40755edebbc43c0ab64fbe6137664c16dc63fba3b
BLAKE2b-256 checksum
How to use checksums
155910e600318d3bc7d2684cac8dac7b24a7ab8ccb40005a26dfddb3c18ebf2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.16

Release files / moviefinder_cli-0.1.0-py3-none-any.whl

Download URL moviefinder_cli-0.1.0-py3-none-any.whl
Size 17.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
700920c20cd30b99bda3aacf3a1f6a4fee73cbf184d8bb1dac5c950a2a6c8b6e
BLAKE2b-256 checksum
How to use checksums
3eb553b724fc136b8bf637558c2f4c2c3c35eb640badb260a219b0df32adb3ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.16

Security for moviefinder-cli 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page