title: How can wget save only certains file types linked to from pages linked to by the target page?
body: <p>How can wget save only certain file types linked to from pages linked to by the target page, regardless of the domain in which the certain files are?</p>
  
  <p>Trying to speed up a task I have to do often.</p>
  
  <p>I've been rooting through the wget docs and googling, but nothing seems to work. I keep on either getting just the target page or the subpages without the files (even using -H), so I'm obviously doing badly at this.</p>
  
  <p>So, essentially, example.com/index1/ contains links to example.com/subpage1/ and example.com/subpage2/, while the subpages contain links to example2.com/file.ext and example2.com/file2.ext, etc. However, example.com/index1.html may link to example.com/index2/ which has links to more subpages I don't want.</p>
  
  <p>Can wget even do this, and if not then what do you suggest I use? Thanks.</p>