wget 可以转换本地 html 文档中的链接吗?

Kev*_* L. 5 mirroring wget

我知道 wget 可以获取远程页面及其依赖项并重写 html,以便图像src属性引用新下载的图像。

我正在尝试转换引用 Internet 上图像的本地 html 文件。我正在使用

wget --mirror --page-requisites --convert-links \
     --directory-prefix=foo \
     --force-html \
     --input-file=my_file.html
Run Code Online (Sandbox Code Playgroud)

所有引用的图像都被下载到适当的位置,foo/但没有改变src属性my_file.html

Cas*_*der 2

尝试这个:

wget --recursive --page-requisites --convert-links --span-hosts http://localhost/some.html
Run Code Online (Sandbox Code Playgroud)