Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
2  
wget -r -l1 -H -A *.mp3,*.html -i input.txt seems to work as expected. I may be able to help, if you provide a concrete example where it fails. –  S Prasanth Dec 11 '12 at 13:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.