httrack命令行使用方法

转载请注明出处:http://www.myzhenai.com/thread-15442-1-1.html http://www.myzhenai.com.cn/post/948.html


httrack:http://www.httrack.com/ 是一款网站镜像程序,就是可以把网站结构下载到本地的程序,某些人也可以称为网站扒皮工具或网站复制工具.

使用者可以通过HTTrack把互联网上的网站页面下载到本地计算机上。在默认设置下,HTTrack对网站页面的下载结果是按照原始站点相对链接的结构来组织的。

HTTrack使用网络爬虫下载网站。对于有robots.txt的网站,如果不在程序运行时取消限制,默认设置下的程序不会把网站完全镜像。HTTrack能跟随基本的JavaScript,或者Applet、Flash中的链接,但是对于复杂的链接(使用函数和表达式创建的链接)或者服务器端的Image Map(Image Map)则无能为力。


命令行下运行httrack的方法

#httrack

Welcome to HTTrack Website Copier (Offline Browser) 3.46+libhtsjava.so.2
Copyright (C) Xavier Roche and other contributors
To see the option list, enter a blank line or try httrack –help

Enter project name :
//输入项目名称,程序会自动生成一个项目名称的目录


Base path (return=/root/websites/) :
//本地保存路径及目录,请输入一个本地的路径.


Enter URLs (separated by commas or blank spaces) :
//欲抓取的网站地址,这里我们以 https://www.dnspod.cn/ 演示


Action:
(enter) 1 Mirror Web Site(s)
2 Mirror Web Site(s) with Wizard
3 Just Get Files Indicated
4 Mirror ALL links in URLs (Multiple Mirror)
5 Test Links In URLs (Bookmark Test)
0 Quit
:
//抓取模式选项,选项汉化过来的意思是
行动:
(进入)1镜像网站(的)
2镜像网站(S)与向导
3只获得文件中声明的文件
4镜在URL中所有的链接(多镜)
5在URL链接(书签测试)的测试
0退出
//这里我选择2


Proxy (return=none) :
//是否使用代理,我没有用代理,直接回车.


You can define wildcards, like: -*.gif +www.*.com/*.zip -*img_*.zip
Wildcards (return=none) :

//使用通配符下载,我直接回车


You can define additional options, such as recurse level (-r), separed by blank spaces
To see the option list, type help
Additional options (return=none) :

//抓取选项,输入help可以查阅详细参数,这里我直接回车

—> Wizard command line: httrack https://www.dnspod.cn/ -W -O “/home/RucLinux/DNSPod” -%v

Ready to launch the mirror? (Y/n) :
//输入 Y 回车

WARNING! You are running this program as root!
It might be a good idea to use the -%U option to change the userid:
Example: -%U smith

Mirror launched on Mon, 04 Mar 2013 02:35:02 by HTTrack Website Copier/3.46+libhtsjava.so.2 [XR&CO’2010]
mirroring https://www.dnspod.cn/ with the wizard help..
Done.
Thanks for using HTTrack!
*
//操作完毕


  • 2
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值