我創建了一個函數,它使用Zend_Feed從Flickr消費RSS提要。 不幸的是我正在努力提取一些密鑰!Zend_Feed entires和冒號分隔鍵
我可以得到< title>和這樣的呼應
$entry->title();
但我怎麼能呼應了類似<媒體:縮略圖>?
我確定有這樣一個完全簡單的方法,但我不能爲我的生活弄清楚它!
下面是一個示例項
<entry>
<id>http://gdata.youtube.com/feeds/api/videos/T-Pq6QSeH7A</id>
<published>2009-09-16T11:51:20.000Z</published>
<updated>2009-09-18T02:37:35.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='Games' label='Gaming'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='torchlight'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='vanquisher'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='mmo'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='mmorpg'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='massively'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='multiplayer'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='online'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='game'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='mmohub'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='hub'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='forums'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='reviews'/>
<title type='text'>Torchlight - Vanquisher Gameplay</title>
<content type='text'>I'm so excited to reveal the latest trailer for Torchlight, featuring the third class, the Vanquisher!</content>
<link rel='alternate' type='text/html' href='http://www.youtube.com/watch?v=T-Pq6QSeH7A&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/T-Pq6QSeH7A/responses'/>
<link rel='http://gdata.youtube.com/schemas/2007#video.related' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/T-Pq6QSeH7A/related'/>
<link rel='http://gdata.youtube.com/schemas/2007#mobile' type='text/html' href='http://m.youtube.com/details?v=T-Pq6QSeH7A'/>
<link rel='self' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/users/mmolifetv/uploads/T-Pq6QSeH7A'/>
<author>
<name>mmolifetv</name>
<uri>http://gdata.youtube.com/feeds/api/users/mmolifetv</uri>
</author>
<gd:comments>
<gd:feedLink href='http://gdata.youtube.com/feeds/api/videos/T-Pq6QSeH7A/comments' countHint='0'/>
</gd:comments>
<media:group>
<media:category label='Gaming' scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>Games</media:category>
<media:content url='http://www.youtube.com/v/T-Pq6QSeH7A?f=user_uploads&app=youtube_gdata' type='application/x-shockwave-flash' medium='video' isDefault='true' expression='full' duration='97' yt:format='5'/>
<media:content url='rtsp://rtsp2.youtube.com/CigLENy73wIaHwmwH54E6erjTxMYDSANFEgGUgx1c2VyX3VwbG9hZHMM/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='97' yt:format='1'/>
<media:content url='rtsp://rtsp2.youtube.com/CigLENy73wIaHwmwH54E6erjTxMYESARFEgGUgx1c2VyX3VwbG9hZHMM/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='97' yt:format='6'/>
<media:description type='plain'>I'm so excited to reveal the latest trailer for Torchlight, featuring the third class, the Vanquisher!</media:description>
<media:keywords>torchlight, vanquisher, mmo, mmorpg, massively, multiplayer, online, game, mmohub, hub, forums, reviews</media:keywords>
<media:player url='http://www.youtube.com/watch?v=T-Pq6QSeH7A&feature=youtube_gdata'/>
<media:thumbnail url='http://i.ytimg.com/vi/T-Pq6QSeH7A/2.jpg' height='90' width='120' time='00:00:48.500'/>
<media:thumbnail url='http://i.ytimg.com/vi/T-Pq6QSeH7A/1.jpg' height='90' width='120' time='00:00:24.250'/>
<media:thumbnail url='http://i.ytimg.com/vi/T-Pq6QSeH7A/3.jpg' height='90' width='120' time='00:01:12.750'/>
<media:thumbnail url='http://i.ytimg.com/vi/T-Pq6QSeH7A/0.jpg' height='240' width='320' time='00:00:48.500'/>
<media:title type='plain'>Torchlight - Vanquisher Gameplay</media:title>
<yt:duration seconds='97'/>
</media:group>
<gd:rating average='5.0' max='5' min='1' numRaters='1' rel='http://schemas.google.com/g/2005#overall'/>
<yt:statistics favoriteCount='0' viewCount='24'/>
我想提取從條目的第一個縮略圖URL。
可悲的是這些似乎都不起作用。謝謝你的想法! – sfusion 2009-10-13 12:56:35