Hacker Public Radio

HPR4398: Command line fun: downloading a podcast


Listen Later

This show has been flagged as Clean by the host.

Kevie, from the
TuxJam podcast, continues his look at audio tools on the
command line; this time focusing on acquiring audio files from an
RSS feed.

Save the latest file from a feed:

wget `curl RSS_FEED | grep -o 'https*://[^"]*FILE_EXTENSION' | head -1`

To get the latest episode of TuxJam

wget `curl https://tuxjam.otherside.network/feed/podcast/ | grep -o 'https*://[^"]*ogg' | head -1`

However if you want the files from the whole feed:

wget `curl RSS_FEED | grep -Eo 'https*://[^"]*FILE_EXTENSION' | sort -u | xargs`

To get every episode of TuxJam:

wget `curl https://tuxjam.otherside.network/feed/podcast/ | grep -Eo 'https*://[^"]*ogg' | sort -u | xargs`

If you wish to specify the directory to save the file in then use
-P /directory after wget. To download the TuxJam feed and place
the files in a directory called Podcasts in your home folder you
would use:

wget -P ~/Podcasts `curl https://tuxjam.otherside.network/feed/podcast/ | grep -Eo 'https*://[^"]*ogg' | sort -u | xargs`

For more in this mini-series of audio command line tools then see:

  • hpr4249 :: Audio Streams on the Command Line
  • hpr4287 :: Schedule audio recordings on the command line
  • hpr4294 :: Schedule audio recordings on the command line - A
    bit of fine tuning

    Provide feedback on this episode.

    ...more
    View all episodesView all episodes
    Download on the App Store

    Hacker Public RadioBy Hacker Public Radio

    • 4.2
    • 4.2
    • 4.2
    • 4.2
    • 4.2

    4.2

    34 ratings


    More shows like Hacker Public Radio

    View all
    The Infinite Monkey Cage by BBC Radio 4

    The Infinite Monkey Cage

    1,964 Listeners

    Click Here by Recorded Future News

    Click Here

    419 Listeners

    Hacker And The Fed by Chris Tarbell & Hector Monsegur

    Hacker And The Fed

    167 Listeners