Backing up a Podcast

Hi, I’m looking fot a way to batch download a podcast feed and save the corresponding files to Dropbox, archiving those episodes. Is there a way to easily do so via Shortcuts?

This seemed like it would be easy, using “Get items from RSS feed” but now that I’ve been trying it, I don’t seem to be able to get the enclosure URLs.

Not to say it can’t be done, of course. Just that it wasn’t as easy as I was expecting.

I’m curious to know the answer now, too.

Here’s a starting point for you.

https://www.icloud.com/shortcuts/397b7b6e20d642c79a6247463498c70e

The shortcut will allow you to download the podcasts from the Automators RSS feed.

Some thoughts around expanding it for your own use:

  • Change it to your own Dropbox folder (rather than a Temp) folder in Shortcuts’ iCloud folder.
  • Change it to work from the share sheet or from an RSS feed on the clipboard if not run from the share sheet.
  • Consider including a menu list for your favourite podcasts as an option to choose what RSS feed you want to work from if there isn’t one on the clipboard.
  • Parse the episode names from the RSS XML, pair these with the URLs, and offer episode numbers + names for the download selection list rather than the long and less meaningful URL.

Hope that helps.

3 Likes

That looks awesome! I’ll definitely give it a try tonight and report back to the community on changes I made.

Thank you @sylumer

Hey @sylumer, just a quick info. I already do know how to fetch the episode names and numbers via RegEx, but am not able to have it correctly paired to the current episodes. I guess a dictionary action could help to have these data points neatly structured, but I really don’t know how to work with dictionaries. Do you know any resources that could help me dealing with Dictionaries in Workflow?

If you extract an episode’s name and link in the same regular expression via grouping, you should be able to use “Get Group From Matched Text” to access the parts individually in the loop.

Ex: /name:(.*)and_link:(.*)/ would have the name in match group 1 and the link in group 2.

Pretty much any in depth tutorial should cover it - I would assume David covered it in his Workflow field guide as it was around in Workflow… I’m assuming you meant Shortcuts BTW :wink:

But they are very straight forward things to use. Think of them like a list (/array). Instead of referring to things by their absolute position in the list, they have a name which you can use to reference them.

Think about your contacts on your iOS device. If you want to call someone you probably refer to their name and get the phone number back. Well that’s effectively just like a dictionary. The key you use is the name and the phone number is the value associated with that.

Extending this further, the name can reference more than just a phone number. It can reference the contact’s e-mail address, date of birth, home/work/mobile phone number, etc. Imagine that when you use the contact’s name as a key for retrieval you get back a contact record rather than a phone number. Now, that contact record could also be imagined as a dictionary. With the person’s name as a key you retrieve a contact record dictionary from within a dictionary of contact records. You could then use say “e-mail” as a key value to retrieve the person’s e-mail address from that dictionary.

Once you have that concept, your next logical step would be to look up JSON. That will help you with data storage and also working with web API, and is one of the primary uses of dictionaries.

Hope that helps.

Yes, indeed! Old habits die hard! I guess I should create a TextExpander snippet to fix this! :wink:

I don’t recall having a dictionary lesson either at David’s Workflow FG nor Shortcuts FG. I guess there could be some room for improvement regarding this topic, @MacSparky.

Anyway, thank you so much for your kind reply, @sylumer. The concept is really straightforward, now I’ll get back to Workflow, I mean Shortcuts, and see what I can do with it.

1 Like

Thank you David! RegEx was not the problem as I could previously get the two groups into two separate variables, the issue is how to pair them correctly.

Whenever I create a For Each action from the first variable (1st set, say Episode Names) I fail to pair them correctly to the 2nd variable (set of URLs) as Shortcuts does not help me to filter which of collection items should be matched to that 1st set.

Even without dictionaries, I’ve somehow managed to get episode names, download and rename them trhough this method.

Here’s the link to share it back to the Community.