我知道wget可以获取远程页面及其依赖项并重写html,以便image src属性引用新下载的图像.
我试图转换在Internet上引用图像的本地html文件.
我正在使用
- wget --mirror --page-requisites --convert-links \
- --directory-prefix=foo \
- --force-html \
- --input-file=my_file.html
所有引用的图像都下载到foo /中的适当位置,但my_file.html中的src属性没有被更改.
解决方法
试试这个:
- wget --recursive --page-requisites --convert-links --span-hosts http://localhost/some.html