轉載請注明出處: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!
*
//操作完畢