Display List of Episodes from List of Podcasts

2019-03-22 08:29发布

I am trying to display a list of podcast channels by a particular author. When a podcast is selected, display the relevant episodes. I am able to do each independently, but can't figure out how to bridge the two.

Right now my list of podcasts by author is generated using the iTunes App Store Search API. For example, you can request

@"term" : @"twit", @"media" : @"podcast"

and it will yield all the podcast channels by the author TWiT. It includes a lot of useful metadata via JSON, such as the title, artworkUrl, etc. But no direct link to the podcast that I can find.

I can also display a list of episodes for a specific podcast by parsing the iTunes RSS Tags from a hardcoded channel link that I extract by subscribing to said podcast in iTunes, then right-clicking on it and selecting Copy Podcast URL. TWiT again as an example would yield:

http://feeds.twit.tv/kh_video_hd.xml

Where this seems to fall apart is linking the two. I can't find a way to extract the direct podcast URL from the iTunes App Store JSON metadata.

I have seen the post on Finding the URL for podcast feeds from an iTunes id, but this seems to suggest you can only do it from the Apple supplied feeds from the iTunes Store RSS Generator. It is limited to predefined criteria (e.g. Top Podcasts).

Suggestions or clarifications would be appreciated. The only path I'm seeing right now is to hard code each of the Podcasts channels from my author list.

2条回答
我只想做你的唯一
2楼-- · 2019-03-22 09:14

Right Here.

"trackViewUrl":"https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?i=120954025&id=120954021&s=143441"

I think.

查看更多
兄弟一词,经得起流年.
3楼-- · 2019-03-22 09:15

I think I've found the key. I'm not sure if this is universal, but in the podcasts I've tested with, the JSON results include a feedUrl parameter. Which frustratingly, is not mentioned on the Search API page.

feedUrl = "http://leoville.tv/podcasts/twit.xml";

Passing the value of this feedURL parameter pulled from the search API JSON results, and parsing it as RSS seems to deliver what I need.

查看更多
登录 后发表回答