Usando um shell que entende os intervalos aritméticos nas expansões de chaves (por exemplo, bash
e ksh93
e zsh
):
wget --load-cookies=cookies.txt "https://example.com/pages/?p="{1..450}
Isso seria expandido (antes de wget
ser chamado) para
wget --load-cookies=cookies.txt "https://example.com/pages/?p="1 "https://example.com/pages/?p="2 "https://example.com/pages/?p="3 ... "https://example.com/pages/?p="450
com curl
:
curl --cookie-jar cookies.txt "https://example.com/pages/?p="{1..450}
Salvando a saída em arquivos individuais com curl
:
curl --cookie-jar cookies.txt -Ooutfile{1..450}.html "https://example.com/pages/?p="{1..450}