Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ plugin version, bump the corresponding lockfile entry in `motrix-turbo`.
| id | `plugins/` dir | purpose |
|----|----------------|---------|
| `motrix.filename-template` | `plugins/motrix.filename-template/` | renames completed downloads from a user-configurable filename template |
| `motrix.scraper-hook` | `plugins/motrix.scraper-hook/` | pre-resolve HTTP hook for site scraping |
| `motrix.scraper-hook` | `plugins/motrix.scraper-hook/` | enrich-band HTTP hook for page scraping; fails open, and is no longer in motrix-turbo's bundled set |
| `motrix.url-resolver` | `plugins/motrix.url-resolver/` | URL-resolver framework + Wikimedia Commons demo resolver; site-specific extraction lives in separately installed site-resolver plugins |

Plugin ids double as tag prefixes and manifest `id` fields — they must match
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ keep their original names because the extension is appended separately.

*Plugin ID: `motrix.scraper-hook`*

> **Not bundled with Motrix.** Page Scraper used to ship as a built-in plugin.
> It now installs on demand, because a page lookup is an optional convenience
> and should never be able to hold up a download. Its `beforeCreate` hook runs
> in the `enrich` band: if the lookup fails or runs long, Motrix drops the
> plugin's contribution and downloads the URL you actually gave it.

Sometimes a "download link" leads to an HTML page that contains the real file
link. Without this plugin, Motrix would save the page as an `.html` file.

Expand Down
2 changes: 2 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ Motrix 2 自带三个插件,分别用来重命名下载好的文件、从下

*插件 ID:`motrix.scraper-hook`*

> **不再随 Motrix 内置分发。** 页面抓取原本是内置插件,现在改为按需安装:查找页面只是锦上添花,不该有能力拖住一次下载。它的 `beforeCreate` hook 现在运行在 `enrich` band,抓取失败或超时时 Motrix 会丢弃该插件的结果,直接下载你输入的那个 URL。

有些所谓的“下载链接”其实只是一个 HTML 页面,真正的文件链接藏在页面里。直接下载这种链接,最后得到的往往只是一个没用的 `.html` 文件。

新建 HTTP 下载时,如果插件发现链接指向 HTML 页面,就会查找页面中的第一个压缩包或安装包链接。目前支持 `.zip`、`.tar.gz`、`.tgz`、`.rar`、`.7z`、`.exe`、`.dmg`、`.iso` 和 `.pkg`。找到后,Motrix 会改为下载对应的文件。
Expand Down
4 changes: 2 additions & 2 deletions plugins/motrix.scraper-hook/motrix-plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"manifestVersion": 1,
"id": "motrix.scraper-hook",
"name": "%name%",
"version": "1.0.0",
"version": "1.1.0",
"description": "%description%",
"categories": ["site-resolver"],
"engines": { "motrix": ">=2.0.0 <3.0.0" },
Expand All @@ -14,7 +14,7 @@
"activationEvents": ["onTaskType:http"],
"contributes": {
"hooks": {
"beforeCreate": { "role": "pre-resolve" }
"beforeCreate": { "role": "enrich" }
},
"configuration": {
"title": "%settings.title%",
Expand Down
Loading