상세 컨텐츠

본문 제목

Ubuntu에서 httrack으로 웹사이트 다운로드하기

Linux

by mingoon.com 2020. 8. 12. 14:04

본문

반응형

나이가 들고, 세월이 지나다 보면 예전에 자주 찾던, 가끔 들어가보던 웹사이트가 없어지는 경우가 있다.

Wayback Machine과 같은 웹 아카이브에 찾아보면 일부 페이지만 있거나, 아예 없는 경우도 허다하여

내 NAS에 보관해두면 어떨까? 어차피 나만 보는거니 저장해 볼까 하는 생각에 찾아보니 httrack이 나오길래

Ubuntu용으로 설치를 해보았다.

sudo apt install httrack

OS별 설치 방법은 이 곳을 참고하면 된다.

 

GUI 버전을 쓰실 분들은 매뉴얼을 참고하고, 난 Ubuntu Server라 CLI 버전으로 테스트해본다.

jQuery 관련 함수를 찾을 때 자주 가는 jqapi.com으로 테스트했다.

kyo@mediasvr:/data1/webarchive$ httrack "http://jqapi.com/" -O "/data1/webarchive/jqapi" -v |& tee -a /data1/webarchive/archive.log
HTTrack3.49-2 launched on Thu, 13 Aug 2020 13:36:40 at http://jqapi.com/
(httrack http://jqapi.com/ -O /data1/webarchive/jqapi -v )

Information, Warnings and Errors reported for this mirror:
note:	the hts-log.txt file, and hts-cache folder, may contain sensitive information,
	such as username/password authentication for websites mirrored in this project
	do not share these files/folders if you want these information to remain private

Mirror launched on Thu, 13 Aug 2020 13:36:40 by HTTrack Website Copier/3.49-2 [XR&CO'2014]
mirroring http://jqapi.com/ with the wizard help..
13:36:54	Error: 	"Not Found" (404) at link jqapi.com/favicon.ico (from jqapi.com/)

13:39:22	Error: 	"Not Found" (404) at link jqapi.com/jqapi.air (from jqapi.com/)

HTTrack Website Copier/3.49-2 mirror complete in 2 minutes 42 seconds : 16 links scanned, 13 files written (2170020 bytes overall) [2161056 bytes received at 13339 bytes/sec], 17823 bytes transferred using HTTP compression in 4 files, ratio 25%, 4.0 requests per connection
(2 errors, 0 warnings, 0 messages)
Done.
Thanks for using HTTrack!

거의 텍스트 기반이라 3분가량 소요되었고, 아래와 같이 저장된 화면을 볼 수 있었다.

하지만 정적 컨텐츠를 저장하는 터라, 일부 스크립트가 동작하지 않는 부분도 있는듯 하다.

관련글 더보기

댓글 영역