27painter/dsh-moli ↗★ 2

dsh-moli

对接本地Moli无头浏览器获取网页内容 适合需要对网页进行渲染抓取、截图或生成PDF的任务。

包名
dsh-moli
兼容性
待验证
版本
1.0.6
许可证
MIT
最近更新
2026年10月13日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:27painter/dsh-moli

Usage

moli_fetch parameters: url (required), dump, writeTo, eval, wait, waitSelector, delayMs, timeoutMs, maxChars, headers, userAgent, layout, scrollbars, noJs, noCss, resources, withFrames, insecureTls, profileDir, cookieFile.

moli_fetch url=https://example.com dump=markdown             # token-efficient text
moli_fetch url=https://example.com dump=semantic_tree_text    # nodes with backend ids
moli_fetch url=https://example.com eval="document.title"      # one computed value
moli_fetch url=https://example.com dump=screenshot writeTo=/abs/path/a.png
moli_fetch url=https://example.com dump=pdf        writeTo=/abs/path/a.pdf

Screenshot and PDF dumps need writeTo; the bytes are written verbatim rather than printed.

Configuration

Override any field under the plugin's config entry in the profile patch layer. All are optional.

- insert:
    - id: dsh-moli
      name: dsh-moli
      config:
        exePath: 'C:\Users\me\AppData\Local\Moli\bin\moli.exe'  # default: auto-detect
        defaultTimeoutMs: 30000                                  # per-fetch readiness deadline
        maxChars: 200000                                         # inline text truncation
        proxy: 'http://127.0.0.1:7890'                           # forward proxy for moli and downloads
        insecureTls: true                                        # see the TLS notes below

Without exePath, the plugin probes exePath → MOLI_BIN → %LOCALAPPDATA%\Moli\bin\moli.exe → %USERPROFILE%\.local\bin\moli.exe, then scans inside %LOCALAPPDATA%\Moli for a moli.exe, so an installation under a versioned subdirectory is still found.