使用wget可以将在线的网站下载到本地。如下实例下载在线的电子书http://web2py.com/books/default/chapter/29到本地目录C:\D\web2pybooken。
1) wget下载网站
set LOCAL-DIR=C:\D\web2pybooken
wget帮助:
wget -h.
-m, --mirror shortcut for -N -r -l inf --no-remove-listing.
--no-remove-listing don't remove `.listing' files.
-p, --page-requisites get all images, etc. needed to display HTML page.
-P, --directory-prefix=PREFIX save files to PREFIX/...
-k, --convert-links make links in downloaded HTML point to local files.
-nH, --no-host-directories don't create host directories.
2)将下载的网站放到httpserver上
如下为在本地通过python2.7启动httpserver,当然你也可以使用其他的httpserver。
cd %LOCAL-DIR%
3) 在ie中打开本地的网站
http://your-local-machine-ip:8080/*****
完!