尝试自己:例如,尝试检索this视频的字段:您将在页面上看到“发布于27 / nov / 2011”。
但是,使用http://gdata.youtube.com/feeds/api/users/zimbarvideo/uploads/?start-index=1&max-results=1通过Youtube API检索XML 返回的XML是:
<?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/opensearchrss/1.0/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:yt='http://gdata.youtube.com/schemas/2007'>
<id>http://gdata.youtube.com/feeds/api/users/zimbarvideo/uploads</id>
<updated>2011-12-05T15:26:39.146Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/>
<title type='text'>Uploads by zimbarvideo</title>
<logo>http://www.youtube.com/img/pic_youtubelogo_123x63.gif</logo>
<link rel='related' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/users/zimbarvideo'/>
<link rel='alternate' type='text/html' href='http://www.youtube.com/profile?user=zimbarvideo#p/u'/>
<link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/users/zimbarvideo/uploads'/>
<link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/users/zimbarvideo/uploads/batch'/>
<link rel='self' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/users/zimbarvideo/uploads?start-index=1&max-results=1'/>
<link rel='next' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/users/zimbarvideo/uploads?start-index=2&max-results=1'/>
<author>
<name>zimbarvideo</name>
<uri>http://gdata.youtube.com/feeds/api/users/zimbarvideo</uri>
</author>
<generator version='2.1' uri='http://gdata.youtube.com'>YouTube data API</generator>
<openSearch:totalResults>274</openSearch:totalResults>
<openSearch:startIndex>1</openSearch:startIndex>
<openSearch:itemsPerPage>1</openSearch:itemsPerPage>
<entry>
<id>http://gdata.youtube.com/feeds/api/videos/lcQ-V9nFZgs</id>
<published>2011-11-28T07:21:41.000Z</published>
<updated>2011-11-28T15:33:45.000Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/>
<category scheme='http://gdata.youtube.com/schemas/2007/categories.cat' term='News' label='Notizie e politica'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='progetto'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='continuità'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='bilinguismo'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='precoce'/>
<title type='text'>285 - TG Cimbro - Zimbar Earde - Luserna</title>
<content type='text'>Zimbar Earde 285 del 26/11/2011
Inaugurazione scuola "progetto continuità -- bilinguismo precoce" "khlummane tritt vürsnen"
interv. a Luca Paolaz, Anna Maria Trenti Kaufman, Sieghart Camper, Monica Pedrazza, Ermenegildo Bidese.
È attivo dal 26/11/11 "Sostegno ai compiti" sab 10.00-12.00 in Biblioteca
L'istituto Ladino di Livinallongo/Santa Lucia in visita al KIL (19/11/2011)
Appuntamenti e invito alla Festa piano giovani degli Altipiani ai Virti - 3/12/2011</content>
<link rel='alternate' type='text/html' href='http://www.youtube.com/watch?v=lcQ-V9nFZgs&feature=youtube_gdata'/>
<link rel='http://gdata.youtube.com/schemas/2007#video.responses' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/lcQ-V9nFZgs/responses'/>
<link rel='http://gdata.youtube.com/schemas/2007#video.related' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/lcQ-V9nFZgs/related'/>
<link rel='http://gdata.youtube.com/schemas/2007#mobile' type='text/html' href='http://m.youtube.com/details?v=lcQ-V9nFZgs'/>
<link rel='self' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/users/zimbarvideo/uploads/lcQ-V9nFZgs'/>
<author>
<name>zimbarvideo</name>
<uri>http://gdata.youtube.com/feeds/api/users/zimbarvideo</uri>
</author>
<gd:comments>
<gd:feedLink href='http://gdata.youtube.com/feeds/api/videos/lcQ-V9nFZgs/comments' countHint='0'/>
</gd:comments>
<media:group>
<media:category label='Notizie e politica' scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>News</media:category>
<media:content url='http://www.youtube.com/v/lcQ-V9nFZgs?version=3&f=user_uploads&app=youtube_gdata' type='application/x-shockwave-flash' medium='video' isDefault='true' expression='full' duration='771' yt:format='5'/>
<media:content url='rtsp://v3.cache5.c.youtube.com/CigLENy73wIaHwkLZsXZVz7ElRMYDSANFEgGUgx1c2VyX3VwbG9hZHMM/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='771' yt:format='1'/>
<media:content url='rtsp://v8.cache4.c.youtube.com/CigLENy73wIaHwkLZsXZVz7ElRMYESARFEgGUgx1c2VyX3VwbG9hZHMM/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='771' yt:format='6'/>
<media:description type='plain'>Zimbar Earde 285 del 26/11/2011
Inaugurazione scuola "progetto continuità -- bilinguismo precoce" "khlummane tritt vürsnen"
interv. a Luca Paolaz, Anna Maria Trenti Kaufman, Sieghart Camper, Monica Pedrazza, Ermenegildo Bidese.
È attivo dal 26/11/11 "Sostegno ai compiti" sab 10.00-12.00 in Biblioteca
L'istituto Ladino di Livinallongo/Santa Lucia in visita al KIL (19/11/2011)
Appuntamenti e invito alla Festa piano giovani degli Altipiani ai Virti - 3/12/2011</media:description>
<media:keywords>progetto, continuità, bilinguismo, precoce</media:keywords>
<media:player url='http://www.youtube.com/watch?v=lcQ-V9nFZgs&feature=youtube_gdata_player'/>
<media:thumbnail url='http://i.ytimg.com/vi/lcQ-V9nFZgs/0.jpg' height='360' width='480' time='00:06:25.500'/>
<media:thumbnail url='http://i.ytimg.com/vi/lcQ-V9nFZgs/1.jpg' height='90' width='120' time='00:03:12.750'/>
<media:thumbnail url='http://i.ytimg.com/vi/lcQ-V9nFZgs/2.jpg' height='90' width='120' time='00:06:25.500'/>
<media:thumbnail url='http://i.ytimg.com/vi/lcQ-V9nFZgs/3.jpg' height='90' width='120' time='00:09:38.250'/>
<media:title type='plain'>285 - TG Cimbro - Zimbar Earde - Luserna</media:title>
<yt:duration seconds='771'/>
</media:group>
<yt:statistics favoriteCount='0' viewCount='23'/>
</entry>
</feed>
它根本不包含2011-11-27,也不包含在数据字段中:
<published>2011-11-28T07:21:41.000Z</published>
<updated>2011-11-28T15:33:45.000Z</updated>
那么,YouTube的API有什么问题?
答案 0 :(得分:1)
上传日期(在页面上)和发布日期(gdata Feed)的时区不同。前者是PST,后者是UTC。