wget parece rastrear somente a primeira página ao usar -A, apesar de usar tanto -r, -e robots = off, -l inf, etc

2

O que eu quero que wget faça é rastrear todo o site recursivamente abaixo de um determinado diretório e baixar todos os arquivos png, por exemplo.

Vou usar a Wikipedia como exemplo. Este é o comando:

wget -r -p -e robots=off -H -D en.wikipedia.org --no-parent -A png http://en.wikipedia.org/wiki/Main_Page

Isso é o que eu recebo:

URL transformed to HTTPS due to an HSTS policy
--2016-07-20 11:02:51--  https://en.wikipedia.org/wiki/Main_Page
Resolving en.wikipedia.org (en.wikipedia.org)... 91.198.174.192, 2620:0:862:ed1a::1
Connecting to en.wikipedia.org (en.wikipedia.org)|91.198.174.192|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘en.wikipedia.org/wiki/Main_Page’

en.wikipedia.org/wi     [  <=>               ]  64.72K   298KB/s    in 0.2s    

2016-07-20 11:02:51 (298 KB/s) - ‘en.wikipedia.org/wiki/Main_Page’ saved [66278]

Removing en.wikipedia.org/wiki/Main_Page since it should be rejected.

URL transformed to HTTPS due to an HSTS policy
--2016-07-20 11:02:51--  https://en.wikipedia.org/static/images/wikimedia-button.png
Reusing existing connection to en.wikipedia.org:443.
HTTP request sent, awaiting response... 200 OK
Length: 2426 (2.4K) [image/png]
Saving to: ‘en.wikipedia.org/static/images/wikimedia-button.png’

en.wikipedia.org/st 100%[===================>]   2.37K  --.-KB/s    in 0s      

2016-07-20 11:02:51 (147 MB/s) - ‘en.wikipedia.org/static/images/wikimedia-button.png’ saved [2426/2426]

URL transformed to HTTPS due to an HSTS policy
--2016-07-20 11:02:51--  https://en.wikipedia.org/static/images/poweredby_mediawiki_88x31.png
Reusing existing connection to en.wikipedia.org:443.
HTTP request sent, awaiting response... 200 OK
Length: 1585 (1.5K) [image/png]
Saving to: ‘en.wikipedia.org/static/images/poweredby_mediawiki_88x31.png’

en.wikipedia.org/st 100%[===================>]   1.55K  --.-KB/s    in 0s      

2016-07-20 11:02:51 (102 MB/s) - ‘en.wikipedia.org/static/images/poweredby_mediawiki_88x31.png’ saved [1585/1585]

FINISHED --2016-07-20 11:02:51--
Total wall clock time: 1.0s
Downloaded: 3 files, 69K in 0.2s (316 KB/s)

O mesmo acontece mesmo se eu adicionar -l inf .

Quando eu executo o mesmo código, mas removo -A png , wget continua baixando, sem nenhum fim à vista, como é suposto fazer.

Então, qual é o problema? Como faço isso para rastrear o site inteiro, mas baixar somente determinados tipos de arquivo?

    
por stanny 21.07.2016 / 08:02

1 resposta

0

O resultado obtido pelo o / p, stanny, é surpreendente, mas é verdade.

Eu obtenho o mesmo resultado, mas também obtenho um resultado bem sucedido de uma página comum da Wikipedia, com o seguinte comando: -

wget --no-check-certificate --span-hosts -e robots=off -p -A png https://en.wikipedia.org/wiki/Antimatter

Estou usando o wget 1.16, executado em um PC com Windows usando o Windows 7 de 64 bits.

    
por Ed999 08.01.2017 / 15:42