$ wget -q -O- http://parisdjs.libsyn.com/rss | grep -o "<enclosure[ -~][^>]*" | grep -o "http://[ -~][^\"]*" | xargs wget -c --2013-09-24 17:33:29-- http://traffic.libsyn.com/parisdjs/Karl_Hector-Soul_Sauvage_d_Afrique_Vol_2.mp3 Resolving traffic.libsyn.com (traffic.libsyn.com)... 204.16.245.39 Connecting to traffic.libsyn.com (traffic.libsyn.com)|204.16.245.39|:80... connected. HTTP request sent, awaiting response... 302 Found Location: http://ec.libsyn.com/p/d/4/0/d40ada743827718e/Karl_Hector-Soul_Sauvage_d_Afrique_Vol_2.mp3?d13a76d516d9dec20c3d276ce028ed5089ab1ce3dae902ea1d01c08737d2c85b33b2&c_id=6161475 [following] --2013-09-24 17:33:30-- http://ec.libsyn.com/p/d/4/0/d40ada743827718e/Karl_Hector-Soul_Sauvage_d_Afrique_Vol_2.mp3?d13a76d516d9dec20c3d276ce028ed5089ab1ce3dae902ea1d01c08737d2c85b33b2&c_id=6161475 Resolving ec.libsyn.com (ec.libsyn.com)... 68.232.34.133 Connecting to ec.libsyn.com (ec.libsyn.com)|68.232.34.133|:80... connected. HTTP request sent, awaiting response... 206 Partial Content Length: 69569861 (66M), 68359815 (65M) remaining [audio/mpeg] Saving to: ?Karl_Hector-Soul_Sauvage_d_Afrique_Vol_2.mp3?
The difference between the original version provided and this one is that this one works rather than outputting a wget error
Neither of the others worked for me. This does.
Directly download all mp3 files of the desired podcast
Just added a little url encoding with sed - urls with spaces don't work well - this also works against instead of enclosure and adds a sample to show that you can filter against links at a certain domain Show Sample Output
Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?
You must be signed in to comment.
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: