I have been trying to download specific pages in website. The site uses common URL to go to next pages like below.
https://example.com/pages/?p=1
https://example.com/pages/?p=2
https://example.com/pages/?p=3 upto 450.
I just want to download those pages and not the hyperlinks that are linked with in the pages (mean not the child pages, just parent file e.g. ?p1 and ?p2 etc).
I have tried using below command, but it is not working.
wget --load-cookies=cookies.txt https://example.com/pages/\?p\=\{1..450\}
Is that mean {..} will not work in wget? If not, are there any option in wget that I can use to achive my goal?
-r
(and--recursive
)? You also double up-np
with--no-parent
(these are the same option). You additionally have no space between the last option and the URLs, and the=
is missing afterp
in the URL.{
or}
. The shell would not recognize it as a brace expansion if you do. Just use"https://example.com/pages/?p="{1..450}
(provided thatwget
understands how to get multiple URLs).