JAVA基础 - HTTRACK安装使用教程

写在前面

工作中经常需要查看在线文档,在没有网络的情况下如何查看在线文档呢?计划使用HTTRACK将文档克隆到本地,然后离线查看。

CENTOS7 安装

A. HTTRACK的官网:https://www.httrack.com
B. 下载:wget https://download.httrack.com/cserv.php3?File=httrack.tar.gz
C. 按如下4条命令执行:
# tar -xzvf httrack.tar.gz
# cd httrack-3.49.2
# ./configure
# make
# make install

如何使用

在命令行中执行如下命令:
# httrack 

Welcome to HTTrack Website Copier (Offline Browser) 3.49-2
Copyright (C) 1998-2017 Xavier Roche and other contributors
To see the option list, enter a blank line or try httrack --help

# 输入项目名称
Enter project name :baidu

# 输入本地存储路径
Base path (return=/root/websites/) :/root/test/baidu

# 输入抓取的网站地址
Enter URLs (separated by commas or blank spaces) :https://www.baidu.com/

# 选择抓取模式
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
: 4

# 是否使用代理(直接回车)
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<number>), separated by blank spaces
To see the option list, type help
# 抓取选项(直接回车)
Additional options (return=none) :

---> Wizard command line: httrack https://www.baidu.com/  -O "/root/test/baidu/baidu" --mirrorlinks  -%v

# 是否启动(输入Y)
Ready to launch the mirror? (Y/n) :Y

WARNING! You are running this program as root!
It might be a good idea to run as a different user
Mirror launched on Mon, 29 Apr 2024 08:50:43 by HTTrack Website Copier/3.49-2 [XR&CO'2014]
mirroring https://www.gushiwen.cn/ with the wizard help..

....

Done.
# 抓取完毕
Thanks for using HTTrack!
  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

cloneme01

谢谢您的支持与鼓励!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值