descriptionDownload the audio files of every podcast you've listened to in Overcast
last changeSat, 28 Nov 2020 23:49:45 +0000 (23:49 +0000)
readme

overcast-downloader

This is a script that lets you download the audio files for every podcast you’ve listened to in Overcast.

I listen to a lot of podcasts, and I use Overcast. Sometimes I want to listen to a podcast I heard a long time ago, but links rot, websites break, and episodes go offline. This script allows me to download the audio file of every episode I’ve listened to, so I have a local archive of podcast episodes.

Background

This is something I’ve wanted for a while (at least two podcasts I loved have completely disappeared from the web), but I was never sure how to do it. In a segment in ATP episode 353, Marco mentioned an export with a list of every episode you’d ever listened to:

I can tell you what Overcast saves in the database table that saves your episode progress, which is by far my biggest database table. It saves, for each episode you’ve interacted with, the current timestamp, and whether it’s been completed. […]

If you go to the account section of the website, you can export OPML – a custom, extended format that I implemented – so you can actually export all your data. […] I can tell you a list of episodes you’ve completed, or played in some way in Overcast.

I went digging, and it was exactly what I wanted – and shortly after, I had a script that downloads every MP3 it refers to.

How to use this script

You need:

Steps:

  1. Get your Overcast OPML file.

    Log in to the Overcast website at https://overcast.fm/login using your email address and password.

    Once you’re logged in, navigate to https://overcast.fm/account. Under “Export Your Data”, click “All data”. This will download an OPML file, which includes a list of every podcast episode you’ve ever played.

  2. Download the Python script.

    Download the script download_overcast_podcasts.py, and save it somewhere on your disk.

  3. Run the script, passing the path to your OPML file as the first argument. For example, if the OPML file is in ~/Downloads/overcast.opml.xml, run:

    $ python download_overcast_podcasts.py ~/Downloads/overcast.opml.xml

    This will start downloading the audio files to a folder called audiofiles. If you’d like to save them somewhere different, pass the --download_dir flag. For example, if you wanted to save the files to ~/Documents/podcasts, run:

    $ python download_overcast_podcasts.py ~/Downloads/overcast.opml.xml --out_dir ~/Documents/podcasts

The initial download will be very slow, depending on how many podcasts you’ve listened to, and it uses a lot of disk space. (At time of writing, I have ~1200 episodes in my export, which take up 61 GB.) On subsequent runs, the script should only download files that it hasn’t saved before, so it should be a lot faster.

License

MIT.

shortlog
2020-11-28 Alex ChanFix cross-device links development
2020-11-28 Alex ChanHandle cross-device renames
2020-02-20 Alex ChanRefactor to be more time/space efficient
2020-02-19 Alex ChanImprove the details in some of the logging
2020-02-19 Alex ChanDownload episode files concurrently, not in serial
2020-01-28 Alex ChanFix a couple of missing references
2020-01-12 Alex ChanAdd a script for downloading all the episodes in an...
2020-01-12 Alex ChanOops, got that number wrong
2020-01-12 Alex ChanAdd some more accurate download stats
2020-01-04 Alex ChanGrab a copy of the RSS feed whenever I download new...
2020-01-04 Alex ChanLet's go Python 3 only, so I can get coloured logging
2020-01-04 Alex ChanUse the human-readable episode title, not the filename
2019-11-23 Alex ChanAllow customising the User-Agent on downloads
2019-11-23 Alex ChanIf a filename is ambiguous, add the Overcast ID
2019-11-22 Alex Chanmissing "the"
2019-11-22 Alex Chanmissing space
...
heads
12 months ago development