Como resolver os cabeçalhos 'last-modified' em falta?

10

Estou a executar wget da seguinte forma:

wget --mirror --adjust-extension --convert-links --no-cookies http://tshepang.net -o log-main

Eu recebo várias mensagens:

Last-modified header missing -- time-stamps turned off.

Suponho que isso significa que as páginas continuam sendo baixadas novamente, mesmo que eu as tenha localmente.

OBSERVAÇÃO : Eu quero isso para que eu não precise baixar novamente os arquivos existentes toda vez que eu executar o espelho de comando.

    
por Tshepang 14.03.2011 / 10:22

1 resposta

8

Você tentou adicionar o parâmetro -c ?

Trecho do manual do wget:

-c --continue

Beginning with Wget 1.7, if you use -c on a non-empty file, and it turns out that the server does not support continued downloading, Wget will refuse to start the download from scratch, which would effectively ruin existing contents. If you really want the download to start from scratch, remove the file.

Also beginning with Wget 1.7, if you use -c on a file which is of equal size as the one on the server, Wget will refuse to download the file and print an explanatory message. The same happens when the file is smaller on the server than locally (presumably because it was changed on the server since your last download attempt)---because ''continuing'' is not meaningful, no download occurs.

On the other side of the coin, while using -c, any file that's bigger on the server than locally will be considered an incomplete download and only "(length(remote) - length(local))" bytes will be downloaded and tacked onto the end of the local file. This behavior can be desirable in certain cases---for instance, you can use wget -c to download just the new portion that's been appended to a data collection or log file.

De acordo com o meu conhecimento, ele deve ignorar arquivos que já foram baixados e têm o mesmo tamanho.

    
por 18.03.2011 / 16:39

Tags