Senin, 14 Maret 2011

Download website dengan UBUNTU

Bagi siapa saja yang suka bikin website, terkadang ingin bisa mengetahui seluk beluk website yang dilihat. Nah biasanya dia berpikiran untuk mendownload keseluruhan website itu, baik file2 htmlnya, cssnya dan lain sebagainya.

Ternyata dengan wget hal itu cukup mudah dilakukan. Berikut ini sedikit trik yang bisa dilakukan dengan wget untuk mendownload sebuah website. (Tulisan berikut ini dicopy paste dari http://ubuntu-snippets.blogspot.com/2008/05/download-website-in-ubuntu.html )


Download a website in ubuntu

We will use wget to save entire webiste. Syntax is
wget http://yoursitename.com

Following are the useful options you can use with wget.

-c / --continue
Resume interrupted download.


-nd / --no-directories
Don't create directory hierarchy.


-P / --directory-prefix=
Save downloaded files to specified directory.


-U / --user-agent=
Spoof user agent string.


-r / --recursive
Go crazy :)


-l / --level=
use 0 for infinite depth level or use number greater than 0 for limited depth.


-k / --convert-links
Modify links inside downloaded files to point to local files.


-p / --page-requisites
Get all images, css, js files which make up the web page.


-np / --no-parent
Don't download parent directory contents.


I normally use following command to download a website.
wget -r --level=0 -convert-links --page-requisites --no-parent

Nah silahkan dicoba...

Tidak ada komentar:

Posting Komentar