我開發一個WordPress插件視頻列表管理器來獲得優酷視頻縮略圖:http://wordpress.org/extend/plugins/video-list-manager/如何使用PHP
我不知道,如果優酷支持我們獲得優酷視頻縮略圖。我想添加VEOH到我的插件和我需要的是: 1.嵌入鏈接(是) 2.縮略圖(否)
請幫幫我!
謝謝
我開發一個WordPress插件視頻列表管理器來獲得優酷視頻縮略圖:http://wordpress.org/extend/plugins/video-list-manager/如何使用PHP
我不知道,如果優酷支持我們獲得優酷視頻縮略圖。我想添加VEOH到我的插件和我需要的是: 1.嵌入鏈接(是) 2.縮略圖(否)
請幫幫我!
謝謝
如果您有指向視頻的鏈接,例如http://www.veoh.com/watch/abcdef123456
首先需要使用API方法veoh.video.findByPermalink來獲取視頻ID:
http://www.veoh.com/rest/v2/execute.xml?method=veoh.video.findByPermalink
&permalink=abcdef123456
&apiKey=12345678-1234-...
你會得到這個結構的XML:
<rsp>
<videoList offset="0" items="1" numItems="1">
<video videoId="12345" ... >
...
隨着該視頻ID然後可以使用API方法veoh.video.getVideoThumbnails該視頻的獲取縮略圖:
http://www.veoh.com/rest/v2/execute.xml?method=veoh.video.getVideoThumbnails
&videoId=12345
&apiKey=12345678-1234-...
你會得到這個結構的XML:
<rsp>
<thumbList offset="0" items="33" numItems="10">
<thumbnail lowResImage="http://....jpg" highResImage="http://....jpg">
</thumbnail>
<thumbnail lowResImage="http://....jpg" highResImage="http://....jpg">
</thumbnail>
...
該API非常易於使用,完整的方法列表請參閱documentation。
我是不是可以有資格成爲優酷的合作伙伴。所以,我不能有API密鑰。 :( –
你不需要的API祕密此方法...只是說仍然不會幫你的插件,我想 – AndreKR
謝謝,反正所以我將優酷忽略並找到了一些其他的視頻網站。! | –
你應該告訴你已經嘗試過的東西。在此期間,這應有助於: http://www.veoh.com/rest/v2/doc.html – kennypu