2014-06-19 140 views
0

我沒有從YouTube網址獲取Feed。YouTube視頻問題

我對YouTube頻道如下:

https://www.youtube.com/user/keyurmistry53 

,並試圖獲取從該視頻,但沒有得到任何視頻的飼料。以下是供稿網址。

http://gdata.youtube.com/feeds/api/videos?author=keyurmistry53&start-index=1&max-results=25

誰能告訴我,什麼是問題與?

回答

0

使用指定的網址,api供稿只顯示2個視頻,而YouTube上的頻道顯示2個以上。請檢查視頻設置以瞭解是否存在差異。 api網址適用於不推薦使用的api版本2。見API版本3:https://developers.google.com/youtube/v3/getting-started

您的網址,http://gdata.youtube.com/feeds/api/videos?author=keyurmistry53&start-index=1&max-results=25,顯示2個視頻,這是(不顯示完整的飼料數據):

<?xml version='1.0' encoding='UTF-8'?> 
<feed xmlns='http://www.w3.org/2005/Atom'> 
    <entry> 
     <title type='text'>Tera Milna Sonu Nigam</title> 
     <link rel='alternate' type='text/html' href='http://www.youtube.com/watch?v=pwRoUHqn9Pw&amp;feature=youtube_gdata'/> 
     <link rel='http://gdata.youtube.com/schemas/2007#video.related' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/pwRoUHqn9Pw/related'/> 
     <link rel='http://gdata.youtube.com/schemas/2007#mobile' type='text/html' href='http://m.youtube.com/details?v=pwRoUHqn9Pw'/> 
     <link rel='self' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/pwRoUHqn9Pw'/> 
     <author> 
      <name>Keyur Mistry</name> 
      <uri>http://gdata.youtube.com/feeds/api/users/keyurmistry53</uri> 
     </author> 
    </entry> 
    <entry> 
     <title type='text'>Gujarati Savariyo Re maro</title> 
     <link rel='alternate' type='text/html' href='http://www.youtube.com/watch?v=D4XA4mLZcAU&amp;feature=youtube_gdata'/> 
     <link rel='http://gdata.youtube.com/schemas/2007#video.related' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/D4XA4mLZcAU/related'/> 
     <link rel='http://gdata.youtube.com/schemas/2007#mobile' type='text/html' href='http://m.youtube.com/details?v=D4XA4mLZcAU'/> 
     <link rel='self' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/D4XA4mLZcAU'/> 
     <author> 
      <name>Keyur Mistry</name> 
      <uri>http://gdata.youtube.com/feeds/api/users/keyurmistry53</uri> 
     </author> 
    </entry> 
</feed> 

當你沒有進的話,那麼似乎還有你的代碼有問題,但沒有使用的網址。