I'm working on a Rails app involving iTunes podcasts and I'd like to display a description for each podcast. But I cannot figure out a way to pull the description using the iTunes Search API. When I "lookup"/"search" by podcast ID, description is not one of the attributes. I'd be open to using another API to get podcast descriptions(something like Freebase for Wikipedia, for ex.), but searching by podcast title outside of the iTunes API is going to be tricky, given that some podcasts have general names like "Start Cooking." Any ideas? Thank you!
Using the lookup API - you can get some meta data for Podcasts but not all of it (as you noted). Here is an example of the lookup from an NPR Show:
http://itunes.apple.com/lookup?id=156274448
In the json response, you want to find the RSS feed URL that the Podcast provider maintains:
"feedUrl": "http://www.npr.org/rss/podcast.php?id=1056"
When you crawl the feed - the Podcast provider is responsible for providing the Description you are looking for:
<description><![CDATA[NPR's Foreign Desk picks the top story from the day's international coverage from Morning Edition,....</description>
Elaborating on Ted's answer above...
The original source of a description for a podcast is that podcast's rss feed.
It can be found within the <description> tag, which sits under the <channel> tag.
So, another option to get the description, instead of going to Apple to ask for it, could be to go directly to the source to get it. i.e. once you know the URL of the podcast rss feed, then you can parse it and get the value from the <description> tag.
Details on the official rss spec can be found here.
That is exactly what Apple and other podcast directories would be doing themselvs to get the description. It looks something like this...
Related
In the new YouTube Google + comments system how can I retrieve comments that contain links.
For example if someone posts a link to another youtube video as follows:
http://www.youtube.com/watch?v=AZNHuFjnmUo
This gets converted to a link by the google plus system. The title of the video is shown as the text rather that the url. i.e. The html shown within the comments is this:
Francis HATES Google+
However the api for that comment only returns the title of the video which is pretty useless seeing as I want to get the link too. I am guessing that the system converts the url into an <a> tag which is stored in the database but then the api strips out the html when its requested so it only returns the videos title.
I have posted a defect here:
https://code.google.com/p/gdata-issues/issues/detail?id=5500
But that bug list seems to have very little activity going on in terms of responses to issues.
So is there another way to get the data I need?
What you can do while this bug remains is to extract the comment id and use it in the Google+ API with an activities.get request. This will return the full post with all links.
A bit cumbersome since it needs one request for each comment you want to check, but it seems to be the only way while the bug remains.
To take an example from the video you linked in the issue:
This YouTube comment returned by the API includes a YouTube link:
http://gdata.youtube.com/feeds/api/videos/rgkDKeSc-1o
/comments/z12hvvcgxznkufyo304ci1iqlnandzxjpes
You can use the z... ID in a request to the Google+ API:
https://developers.google.com/apis-explorer/#p/plus/v1/plus.activities.get?activityId=z12hvvcgxznkufyo304ci1iqlnandzxjpes
Which includes the full post including links.
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.
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.
Right Here.
"trackViewUrl":"https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?i=120954025&id=120954021&s=143441"
I think.
Hi guys, this is my first time to post on this awesome community so
please bear with me.
I am working with a Wordpress Plugin that can display a Youtube Search Results into Video Playlist.
My settings are:
Keywords
Author
Content- channel/keyword
My first Approach was this:
with this api as reference,
search for the keyword > display the relevant results according to the author as playlist
*I'm in doubt if I this is possible, coding 30%
*I'm not sure where could I use my settings for Content
but then when my coding is in progress I recently bumped an article that says Youtube Search is differrent on Searching a Youtube Playlist
Now I can't continue my coding because I'm not sure If I'm doing it
right. Can you give me some advise with this situation or show me some
similar project/examples?
You don't have to write any YouTube Data API code for this; it's a built-in feature of the YouTube Player.
This blog post has an example of loading a list player that takes its content from the recent uploads of a channel. You can do something similar by setting listType=search&list=SEARCH_TERM, where SEARCH_TERM is whatever string you want to search for (be sure to URL escape it). You can read more in the documentation.
YouTube has this cool thing that creates a "smart playlist" from some starting keywords. I would like to programmatically access the playlist. I've found the YouTube data API but it doesn't discuss the "disco" feature.
One of the answers below suggests using
http://www.youtube.com/disco?action_search=1&query=XXXXXXXXX
that will return some JSON with the first video to be played, and a list property. Unfortunately, the list is a 32-character hex string, whereas normal playlist ID's are 16-character hex strings. This means that the standard data API to retrieve the full playlist doesn't work.
Any suggestions?
First, I must say I I never used youtube data API, so I don't know how useful below information will be.
Let me use an example:
I wanted to create Smashing Pumpkins. I typed the artist name and clicked the "Disco!" button. Using Fiddler2 I figured out the requested url was:
www.youtube.com/disco?action_search=1&query=smashing%20pumpkins
Notice, that spaces are replaced with %20. As a response i got simple JSON response:
{"url": "\/watch?v=bhMz7x1ZaGM\u0026feature=disco\u0026playnext=1\u0026list=MLGxdCwVVULXe5-F4X_zm6wnblRsnXoPJS"}
It was a link to the first song of freshly generated Smashing Pumpkins playlist, which address was list=MLGxdCwVVULXe5-F4X_zm6wnblRsnXoPJS. All you have to do know is replacing \u0026 with & and you get a valid link.
I assume the rest magic you want to do is available via official youtube data API.
I hope my research will help you.
EDIT
Well, it looks like this playlist generated by youtube/disco is not the same type of playlist that users can generate and that is available via API. The list ID is longer than usuall and when you click "More info about playlist" you are redirected to artists profile. Based on this two facts, i guess it's impossible to retrive generated lists via API. Sorry.
#Randomblue, how exactly do you want to retrieve this playlist?
You can use the 32 char hex in this url to get a page detailing the playlist
https://www.youtube.com/playlist?list={HEX}
or in an embed playlist iframe, like this:
<iframe width="853" height="480" src="//www.youtube.com/embed/videoseries?list={HEX}" frameborder="0" allowfullscreen></iframe>
A long time ago, I developed a chrome extension that is able to scrobble the songs you listen to on youtube (via your last.fm account). What I did was simply taking the title of the video and assuming it had the proper format: "Artist - Track name" (obviously, I would send a request to last.fm, confirming it was a proper artist/song pair, before scrobbling). Recently (well, probably a couple of months ago) youtube started to provide artist and song information directly under the video (see image), and I was wondering how best to extract this information.
I was hoping to retrieve the information via the youtube feed api call (http://gdata.youtube.com/feeds/api/videos/videoID?alt=json), but it doesn't apear to be featured in the returned json element. Alternatly, I could try extracting it via xpath, but I figure that might lead to complications when no artist/song information is present. If anybody could help me extract this information, and thereby greatly improving my extension, I would be very grateful.
I don't think YouTube API can provide you with the artist name
as the videos can be other things that songs
you need to stick with what you have , unless they updated there API