2013-07-22 38 views

回答

2

讀取響應,並使用URL以獲得相關視頻

相關視頻Feed包含涉及 其他視頻的視頻列表。 YouTube通過算法選擇一組相關的 視頻。

API響應中的每個視頻條目都包含一系列標記。 rel屬性值爲 http://gdata.youtube.com/schemas/2007/#video.related的標籤標識用於檢索與該視頻條目相關的其他視頻的 URL。 (該 標籤的href屬性標識的網址。)

<link rel="http://gdata.youtube.com/schemas/2007#video.related" 
    type="application/atom+xml" 
    href="https://gdata.youtube.com/feeds/api/videos/ZTUVgYoeN_b/related?v=2"/> 

https://developers.google.com/youtube/2.0/reference#Related_videos_feed

+0

哦,謝謝!我錯過了文檔 – Taras

+0

Np中的這個話題。如果它解決了你的問題,請接受答案。 – Slartibartfast

相關問題