Para copiar um site inteiro, incluindo fotos, arquivos js e css usando o wget no Linux execute o seguinte comando:
$ wget \
--user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36" \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--restrict-file-names=windows \
--domains exemplo.com \
--no-parent \
-e robots=off \
--load-cookies=cookies.txt \
exemplo.com/blog
o parâmetro –domains informa ao wget para só baixar arquivos daquele domínio.
O último diz de qual raiz copiar. Nesse caso eu só copiaria os arquivos, recursivamente, do /blog do site exemplo.com.
A explicação dos parâmetros segue abaixo. Depois eu traduzo:
–recursive: download the entire Web site.
–domains website.org: don’t follow links outside website.org.
–no-parent: don’t follow links outside the directory tutorials/html/.
–page-requisites: get all the elements that compose the page (images, CSS and so on).
–html-extension: save files with the .html extension.
–convert-links: convert links so that they work locally, off-line.
–restrict-file-names=windows: modify filenames so that they will work in Windows as well.
–no-clobber: don’t overwrite any existing files (used in case the download is interrupted and
resumed).

Comentários 0
Nenhum comentário ainda.