Monday, October 8, 2012

[YouTube-API] YouTube EDU category file has wrong category numbers

I downloaded the YouTube EDU categories file from http://gdata.youtube.com/schemas/2007/educategories.cat as described in https://developers.google.com/youtube/2.0/developers_guide_protocol_education.

It seems that the category numbers in the file do not reflect the actual categories. For example, the file contains:

    <atom:category term='326' label='Italian' xml:lang='en-US'>
       
<yt:parentCategory term='49'/>
   
</atom:category>


However, when I try to retrieve the category feed for category 326, which should be 'Italian', using http://gdata.youtube.com/feeds/api/edu/courses?v=2&category=326, I get a computer science feed instead:

<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:yt='http://gdata.youtube.com/schemas/2007' gd:etag='W/&quot;C0cMR3YzfSp7I2A9WhJaF08.&quot;'>
   
<id>tag:youtube.com,2008:edu:course</id>
   
<updated>2012-10-08T18:31:26.885Z</updated>
   
<category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#course'/>
   
<title>Courses for category 326</title>
   
<logo>http://www.youtube.com/img/pic_youtubelogo_123x63.gif</logo>
   
<link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/edu/courses'/>
   
<link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/edu/courses/batch'/>
   
<link rel='self' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/edu/courses?start-index=1&amp;max-results=25&amp;category=326'/>
   
<link rel='service' type='application/atomsvc+xml' href='http://gdata.youtube.com/feeds/api/edu/courses?alt=atom-service'/>
   
<author>
       
<name>YouTube</name>
       
<uri>http://www.youtube.com/</uri>
   
</author>
   
<generator version='2.1' uri='http://gdata.youtube.com'>YouTube data API</generator>
   
<openSearch:totalResults>12</openSearch:totalResults>
   
<openSearch:startIndex>1</openSearch:startIndex>
   
<openSearch:itemsPerPage>25</openSearch:itemsPerPage>
   
<entry>
       
<id>tag:youtube.com,2008:edu:course:0DB77CB540B41DFF</id>
       
<updated>2012-10-08T18:31:26.885Z</updated>
       
<category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#course'/>
       
<category scheme='http://gdata.youtube.com/schemas/2007/educategories.cat' term='326'/>
       
<title>CS606 Compiler Construction</title>
       
<summary>Compiler Construction</summary>
       
<link rel='lectures' href='http://gdata.youtube.com/feeds/api/edu/lectures?course=0DB77CB540B41DFF'/>
       
<link rel='self' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/edu/courses/0DB77CB540B41DFF'/>
       
<media:group>
           
<media:thumbnail url='http://i.ytimg.com/vi/nVsUbG65TWY/default.jpg' height='90' width='120' yt:name='default'/>
           
<media:thumbnail url='http://i.ytimg.com/vi/nVsUbG65TWY/hqdefault.jpg' height='360' width='480' yt:name='hqdefault'/>
       
</media:group>
       
<yt:playlistId>0DB77CB540B41DFF</yt:playlistId>
   
</entry>



--
Starting October 15, 2012, this group will stop accepting new posts. We recommend that developers start using Stack Overflow and the Issue Tracker for YouTube API support. More details about this change and relevant links can be found at http://apiblog.youtube.com/2012/09/the-youtube-api-on-stack-overflow.html
 
 

No comments:

Post a Comment