YouTube EDU类别文件与实际类别不对应

时间:2012-10-08 18:55:33

标签: youtube-api

我正在使用YouTube EDU类别文件http://gdata.youtube.com/schemas/2007/educategories.cat,如YouTube API开发人员指南中所述。

文件中的类别编号似乎与实际类别不对应。例如,该文件包含:

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

表示类别326应为“意大利语”。但是,如果我尝试使用:http://gdata.youtube.com/feeds/api/edu/courses?v=2&category=326检索该类别的课程,那么我将获得计算机科学课程。以下是回复的摘录:

<?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>

为什么我没有看到我指定类别的正确课程?

1 个答案:

答案 0 :(得分:0)

这看起来像是一个YouTube缓存问题。如果我足够刷新,我会看到它在意大利语和计算机科学之间切换。你介意在这里提交一个bug吗? https://code.google.com/p/gdata-issues/issues/entry?template=YouTube%20(Defect%20Report

我还会向我的联系人报告此问题。