I'm trying to use wget to download all mp3 files linked to from a list of input URLs, but residing on an external host. The input URLs are contained in the file input.txt Each URL listed in input.txt leads to an index.html which has several links on a local host (which I don't care about), as well as a link to http://external.server.is.here.com/path/some_audio_file.mp3 (which I am trying to download). The same external server is used for all the mp3 files I am interested in. I've tried:
wget -r -l1 -H -A *.mp3 -Dexternal.server.is.here.com -i input.txt
but this results in all index.html files being rejected, and therefore they're not followed either. The next attempt:
wget -r -l1 -H -A *.mp3,*.html -Dexternal.server.is.here.com -i input.txt
gets all the index.html files, but does not get any of the linked mp3 files from the external server.
The next attempt:
wget -r -l1 -H -A *.mp3,*.html -i input.txt
gives the same result as the previous attempt. As well as using -l2 for depth.