I currently live in the California High Desert, in the area close to Joshua Tree. It’s a beautiful and out of the way place with stunning landscapes and a definite lack of cell towers and internet in general. I am also a big fan of NPR’s Morning Edition. Yes, it is a little too liberal for my taste, but unlike most news outlets, they are honest about trying to remain neutral, and try hard to deliver relevant content.
The problem with Morning Edition is that it’s only available on the web or through the phone app which does not allow you to download stories. It’s also available on the radio, I suppose, but that’s so 1990s :). To address this issue I made the NPRmebash script to scrape the NPR webpage and make a RSS formatted podcast just for me.
How it Works
The script scrapes the NPR web page for the MP3 links, downloads the MP3s using
wget, and adds them to the podcast XML. Very simple. I made the script to download the MP3s because sometimes I listen to the stories a few days later, and I am not sure how long NPR keeps the MP3s live on their servers. The script keeps the last 150 stories on the server and automatically deletes the rest. You can disable this if you like.
Install and Use NPRme
- You’ll need
wgetto run the scrip. You probably already have them, but if not, install them using your OS’s package manager.
- Download NPRme script and place it in an empty directory on your web server.
- Change the
servervariable in the script to the HTTP URL of the folder where the script lives. This will also be the URL of the RSS Feed.
- Add the script to your cron tasks or run manually as necessary.
- Make sure that the user running the script has write privileges to the directory housing the script.
- Change the
nprurlvariable in the script to another program, like All Things Considered, to download that program.
logo.jpgfile to the same directory with dimensions of 300 by 300 pixels and it will appear as the thumbnail for the podcast.
Using it with iOS Podcasts App
It’s a little tricky to add feeds not listed in iTunes to the iOS Podcast App. To do so:
- Open the app.
- Tap on the “My Podcasts” tab on the bottom.
- Tap the search field in the “My Podcasts” screen, NOT in the “Search” screen.
- Enter the full URL to the RSS feed and “search” for it.
- The app will ask you if you want to “Subscribe to Podcast” and repeat the URL you entered. Hit “Subscribe.”
NPR permits you to download MP3s for personal use. This software downloads the MP3s to your computer/server, and then transfers them to your Podcast playing device, which isn’t much different from you doing the same work manually. So this should not be a violation of their terms of service or fair use rules. However, do NOTdistribute the link to the feed or rebroadcast the programs without NPR’s permission. All NPR programs are Copyrighted by NPR.
Fork it on GitHub, use and enjoy. And be nice to NPR and do NOT rebroadcast. Released under MIT License.