Download files linked in a RSS feed

wget -q -O- http://example-podcast-feed.com/rss | grep -o "<enclosure[ -~][^>]*" | grep -o "http://[ -~][^\"]*" | xargs wget -c
This script can be used to download enclosed files from a RSS feed. For example, it can be used to download mp3 files from a podcasts RSS feed.
Sample Output
$ 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?

0
By: talha131
2013-09-24 12:38:08

5 Alternatives + Submit Alt

What Others Think

You have done a great job on this article. It’s very readable and highly intelligent. You have even managed to make it understandable and easy to read. You have some real writing talent. Thank you. Court bundle
Goodbooks · 6 weeks and 3 days ago
Due to some technical issues caused some pause but it was after all about those files to get them installed for my project related to applique digitizing services
velvetyoung · 6 weeks and 1 day ago
Hi I'm so glad I found your blog, I'm here and can only say thanks for a great post. Let's continue to do well. If you have more time, please visit: girls games
among · 6 weeks and 1 day ago
Ah, so this is how I can store host IP in a variable. Good to know about this. I will ask my robotheartstories.com colleagues what they think about this. I hope they'll share their honest opinion.
robinjack · 5 weeks and 5 days ago
It has never been easy to buy cannabis online. Especially the high-quality strains that can be used by an adult. We also offer discrete and overnight shipping to most countries across the globe. CONTACT DETAILS  Website... https://legalpsychedelic-store.com/ Email... legalpsychedelicstore@gmail.com Whatsapp....+12135339726 mdma pills for sale Buy DMT Online pure mdma crystal LSD FOR SALE. liberty caps golden teacher mushrooms Buy ketamine powder BUY 5-MeO-DMT Lsd for sale  Buy legal psychedelics buy magic mushrooms online buy magic mushrooms online buy lsd online Buy legal psychedelics
lobe123 · 3 weeks and 6 days ago

What do you think?

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.

What's this?

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.

Share Your Commands



Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: