Wget将网站下载到本地
2013-03-24 19:38
267 查看
使用wget可以将在线的网站下载到本地。如下实例下载在线的电子书http://web2py.com/books/default/chapter/29到本地目录C:\D\web2pybooken。
1) wget下载网站
set LOCAL-DIR=C:\D\web2pybooken
set WEBSITE-URL=http://web2py.com/books/default/chapter/29wget --mirror --page-requisites --convert-links --no-host-directories --html-extension -P %LOCAL-DIR% %WEBSITE-URL%
wget帮助:
wget -h.
-m, --mirror shortcut for -N -r -l inf --no-remove-listing.
-r, --recursive specify recursive download.-l, --level=NUMBER maximum recursion depth (inf or 0 for infinite).-N, --timestamping don't re-retrieve files unless newer than local. --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.
-E, --html-extension save HTML documents with `.html' extension.-nH, --no-host-directories don't create host directories.
2)将下载的网站放到httpserver上
如下为在本地通过python2.7启动httpserver,当然你也可以使用其他的httpserver。
cd %LOCAL-DIR%
python -m SimpleHTTPServer 8080
3) 在ie中打开本地的网站 http://your-local-machine-ip:8080/*****
完!
1) wget下载网站
set LOCAL-DIR=C:\D\web2pybooken
set WEBSITE-URL=http://web2py.com/books/default/chapter/29wget --mirror --page-requisites --convert-links --no-host-directories --html-extension -P %LOCAL-DIR% %WEBSITE-URL%
wget帮助:
wget -h.
-m, --mirror shortcut for -N -r -l inf --no-remove-listing.
-r, --recursive specify recursive download.-l, --level=NUMBER maximum recursion depth (inf or 0 for infinite).-N, --timestamping don't re-retrieve files unless newer than local. --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.
-E, --html-extension save HTML documents with `.html' extension.-nH, --no-host-directories don't create host directories.
2)将下载的网站放到httpserver上
如下为在本地通过python2.7启动httpserver,当然你也可以使用其他的httpserver。
cd %LOCAL-DIR%
python -m SimpleHTTPServer 8080
3) 在ie中打开本地的网站 http://your-local-machine-ip:8080/*****
完!
相关文章推荐
- Wget将网站下载到本地
- wget下载网站的目录
- 如何下载会议论文集?如何将整个网站的资源离线到本地?
- wget 下载整个网站,或者特定目录
- 使用scrapy来抓取 ChinaPub 这个网站上的图片_并且将其下载到本地
- wget 下载整个网站,或者特定目录
- wget 下载整个网站,或者特定目录
- Wget下载整个网站(包含图片/JS/CSS)
- 给你的移动网站加点料:推荐下载App,如果本地安装则直接打开本地App(Android/IOS)
- linux下wget如何下载整个网站,或者特定目录全部文件
- wget从oracle网站中下载jdk
- wget 递归下载整个网站
- wget 下载整个网站
- wget 下载整个网站,或者特定目录
- CYQ.IIS 下载中心[ASP.NET 本地运行网站无需要安装IIS]
- python抓取网站的图片并下载到本地
- 网站资源下载利器wget
- citrix web Interface5.3 访问WEB网站时,下载本地客户端
- wget下载整个网站
- wget 递归下载整个网站