1

I would like to get a copy of this page: http://databyte.ch/services/tony/index.html obviously this page is already a copy of the original source: http://www.tonyvanroon.com/oldwebsite/circ/circuits.htm

But there were some broken links. Now i have made a copy of the index page and corrected all the links to point to the wayback archive. Now nearly evereything is browseable. But now i would like to make a copy of the corrected page with wget. The problem now is: if wget follows the external links due to the -H parameter, it will also download files which are linked in the external page.

For example: On this page: https://web.archive.org/web/20130318175317if_/http://www.sentex.ca/~mec1995/circ/alt1.htm

there is a link to: https://web.archive.org/web/20130401212207if_/http://www.sentex.ca/~mec1995/circ/circuits.htm

These are different timestamps: 20130318175317if_ vs 20130401212207if_

Now the wheel gets spinning. Cause on the second index page there are links with many other timestamps and so on...

So what i would like to achieve is, that wget only downloads down to the first level:

databyte.ch -> All links which points to https://web.archive.org/web/20130318175317if_

And not more...

How can i achieve that? Thanks!

1 Answer 1

3

You can use the depth parameter with wget:

  -l depth
  --level=depth
      Specify recursion maximum depth level depth.
wget -r -l 1 -k -p -H --domains=web.archive.org http://databyte.ch/services/tony/index.html

Where -r sets recursive mode, -k converts links, -p download pre-requisites and -H spans hosts. Specifying --domains will only span to those hosts.

1
  • thanks for your answer :)
    – C. Hediger
    Sep 21, 2019 at 7:34

You must log in to answer this question.

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