2

After downloading a tutorial via

wget -r -l 1 -k -nd -p http://scikit-learn.org/stable/tutorial/index.html

wget rewrites (-k) the link of all the documents on the index.html page to point to local links downloaded via -r -l 1. This tutorial consists of three pages, with a link from page 1 to page 2 (and from page 2 to page 3), so the "structure" is

  • index
    • page 1 (links to page 2)
    • page 2 (links to page 3)
    • page 3

The link on page 1 to page 2 is not rewritten to the local page 2-file, even though wget downloaded page 2.

Did I do something wrong? Is there a way to fix this?

1 Answer 1

2

The link given is a list of tutorials, and not a link to check for the actual problem your having.

I would suggest based on the base file in your example is

/index.html

which is in its own directory and assuming links will be in that directory as well, Try this:

    wget -m -k -p http://scikit-learn.org/stable/tutorial
         or
    wget -m -k -p http://scikit-learn.org/stable/tutorial/

instead of using

    wget -r -l ( recourse | level) 

use

-m or mirror option which is a shortcut for -N -r -l inf --no-remove-listing

remove the -nd    ( no host directories )

which could lead to issues for any css pictures etc that are needed to make page work even though your using -k

1
  • This increased the download size by several orders of magnitude (I aborted when it started to DL the huge pdf). Is there a way to avoid that?
    – serv-inc
    May 27, 2017 at 4:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.