How do apps like Overcast and Podcast addict retrive the list of podcasts?

亡梦爱人 提交于 2020-05-17 08:20:06

问题


Do apps like these use external API's to fetch podcasts?

if so, how do the API provider update their databases? if not how do the apps themselves update their podcasts databases?

I don't seem to find this information on Google, although I may not be using the correct keywords.


回答1:


TL;DR - podcast app queries major podcast directory to get URL of rss feed, then podcast app queries rss feed to get specific details about the podcast, including fetching an episode.


To answer your question, do the podcast apps use an API to fetch podcasts?

Kind of...

The podcast app doesn't usually use an API to fetch a podcast. It uses an API to discover/know-about a podcast in the first place.

In order for a podcast app to know about which podcasts are available, they often query one of the major podcast directories, such as iTunes, Spotify or Stitcher.

For example, here is some info about Apple's iTunes API.

Here is some info for podcasters on how Overcast (a podcast app) works.


For each podcast they know about, the podcast apps then have a reference to the rss feed for the podcast.

The podcast apps get this reference to the rss feed from the previous step above (i.e. when they queried the major directories).

The rss feed is a file that is publicly available on the internet. i.e. it is accessible via a URL.

The podcast itself is responsible for publishing its own rss feed. Usually, rss feeds are published as part of the hosting for the podcast.

The rss feed provides information about the podcast and each of its episodes.

The podcast apps periodically check the rss feed to see if there are any updates.

The podcast apps translate the rss feed information into a user-friendly format, which is what you see when you view the details of specific podcast in the app.

Here is some background info from apple on what goes into a podcast rss feed.

Here are some example rss feeds from some popular podcasts that you might have heard of:

  • This American Life
  • Reply All
  • Freakonomics
  • Stuff You Should Know

Last part of this puzzle... how do the major podcast directories know about a podcast rss feed?

The owner/creator of a podcast creates an account with the directory and then submits a valid rss feed to the directory.

For example, here is how you submit a feed to:

  • Stitcher
  • iTunes
  • Spotify



回答2:


A podcast feed is a specific type of RSS feed, which is an XML document. You'd download it like any other web request.

The podcast specific part of the feed is the dates and episode IDs. So if your app downloaded a file yesterday, and got episodes 1-10, and then again tomorrow and gets episodes 1-11, then the app would remember IDs 1-10, and know that #11 is new.

Try searching for "Podcast RSS Feed Example".

Sample results:

https://www.thepolyglotdeveloper.com/2016/02/create-podcast-xml-feed-publishing-itunes/

https://jackbarber.co.uk/blog/2017-02-14-podcast-rss-feed-template



来源:https://stackoverflow.com/questions/58193953/how-do-apps-like-overcast-and-podcast-addict-retrive-the-list-of-podcasts

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!