我無法從我的YouTube帳戶中抓取最後4個上傳「未列出」的視頻。我可以與公衆一起做,但它不會與未列出的工作。有一個我可以使用的gdata API嗎?Youtube API或鏈接...檢索不公開的視頻?
這是我公開使用的,然後解析結果。 https://gdata.youtube.com/feeds/api/users/UserName/uploads?orderby=updated&max-results=4
我無法從我的YouTube帳戶中抓取最後4個上傳「未列出」的視頻。我可以與公衆一起做,但它不會與未列出的工作。有一個我可以使用的gdata API嗎?Youtube API或鏈接...檢索不公開的視頻?
這是我公開使用的,然後解析結果。 https://gdata.youtube.com/feeds/api/users/UserName/uploads?orderby=updated&max-results=4
不幸的是,我不認爲這是可能的,因爲未列出的視頻的隱私。
從顯影劑引導:https://developers.google.com/youtube/2.0/developers_guide_jsonc
「不公開的視頻未包括在搜索結果或在 任何其他方式顯示,並且用戶僅可以通過輸入 或直接鏈接到到達未列出的視頻視頻的觀看頁面URL「。
我可以登錄到我的帳戶並獲取鏈接嗎? – acctman 2012-03-16 02:01:02
您可以嘗試驗證您的請求
見:https://developers.google.com/youtube/2.0/developers_guide_jsonc
殼例如:
# getting auth token
TOKEN=$(curl --silent 'https://www.google.com/accounts/ClientLogin' --data-urlencode Email=YOUR_EMAIL --data-urlencode Passwd='YOUR_PASSWORD' -d accountType=GOOGLE -d source=SO -d service=youtube | grep Auth)
# call api with Authorization
curl --silent --header "Authorization: GoogleLogin $AUTH" "https://gdata.youtube.com/feeds/api/users/UserName/uploads?orderby=updated&max-results=50"
爲PHP,看看這個頁面: http://code.google.com/p/oauth-php/wiki/ConsumerHowTo
這有點棘手。未列出的視頻是a) a)沒有 b)有
但是,問題是YT上傳API不返回任何視頻條目,只有或沒有。你可能不得不進行另一個API調用來提取視頻的yt:accessControl?
我想出了:)你必須使用上傳API v = 2才能獲得yt:accessControl標籤。 – FrankNguyen 2013-06-28 21:18:08
您可能需要授權請求:https://developers.google.com/youtube/2.0/developers_guide_protocol_oauth2#OAuth2_Authentication。你會用哪種語言? – moul 2012-03-16 01:39:51
我將使用PHP – acctman 2012-03-16 02:00:27