4

I want to download a set o files from a website. The HTML documents are linked with

<a href="https://website.com/path/to/folder/jjxx.70" data-linktype="relative-path">bla</a>

after the download of the primary file the path/to/folder is removed as expected. The remaining line is:

<a href="jjxx.70" data-linktype="relative-path">bla</a>

But wget doesn't download the referenced files although I passed the mirror parameter. All I get is:

c:\>wget-1.12 -m -p -E https://website.com/path/to/folder/jjroot
... progress information ...
2018-09-15 18:52:33 (708 KB/s) - `website.com/path/to/folder/jjroot.html' saved [25784/25784]

FINISHED --2018-09-15 18:52:33--
Downloaded: 1 files, 25K in 0.04s (708 KB/s)
  • Why does wget download only "1 files"?
  • How can I tell wget to actually download recursively?

Edit: Since I've been asked: The version of the wget is 1.12. I also used wget 1.19.4 wit the same result.

3
  • 1
    Did you read the wget manual? It has a whole section about recursive downloads.
    – RalfFriedl
    Sep 15, 2018 at 19:03
  • First, share the version of Wget you're using. wget -V. I see that you're using it on WIndows. Very often people end up using very ancient versions of Wget where half the solutions won't work. EDIT: It seems like you are using Wget 1.12, which is approx 6 years old. The latest release is 1.19.5 which was released this year.
    – darnir
    Sep 16, 2018 at 11:43
  • @darnir Well, wget-1.12 reports as version "1.12.1-devel". This isn't a surprise to me.
    – harper
    Sep 16, 2018 at 12:41

1 Answer 1

7

The command is:

wget -r -np -l 1 -A zip http://example.com/download/

Options meaning:

-r,  --recursive          specify recursive download.
-np, --no-parent          don't ascend to the parent directory.
-l,  --level=NUMBER       maximum recursion depth (inf or 0 for infinite).
-A,  --accept=LIST        comma-separated list of accepted extensions

You can customize required extensions using -A parameter

reference

https://stackoverflow.com/questions/13533217/how-to-download-all-links-to-zip-files-on-a-given-web-page-using-wget-curl
1
  • 1
    Unfortunately this doesn't change anything. It still just download one file.
    – harper
    Sep 16, 2018 at 7:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .