How to get wget to skip links leading to parent elements?

Say I have:

http://svnserver/repoid/appname/language/module/ 

I am trying to load everything below the node module , unfortunately the page contains links to both elements below and elements above in the hierarchy (as the output of bash ls -ltr ). Therefore, when I use wget with the possibility of recursive download, I get the full loaded website (svn repository), and not just the module I need.

Is there any trick to prevent wget from following links pointing to parent elements?

+6
source share
2 answers

It looks like you are looking for the --no-parent option.

From wget --help output

  -np, --no-parent don't ascend to the parent directory. 
+9
source

From man wget :

-np

- no parent

Never go up to the parent directory when recursively reverting. This is a useful option because it ensures that only files below a certain hierarchy are downloaded.

+3
source

Source: https://habr.com/ru/post/908328/


All Articles