2012-10-09 67 views
2

我一直在Google App Engine應用程序中使用YouTube數據API 5個月,未收到服務不可用,503錯誤響應。但是今天,我得到這個:服務不可用503錯誤,來自Google App Engine應用程序的請求

YouTubeError: { 
    'status': 503, 
    'body': '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n<html>\n<head><meta http-equiv="content-type" content="text/html; charset=utf-8"><title>http://gdata.youtube.com/action/GetUploadToken</title></head>\n<body style="font-family: arial, sans-serif; background-color: #fff; color: #000; padding:20px; font-size:18px;" onload="e=document.getElementById(\'captcha\');if(e){e.focus();}">\n<div style="max-width:400px;">\n <hr noshade size="1" style="color:#ccc; background-color:#ccc;"><br>\n \n \n <div style="font-size:13px;">\n Our systems have detected unusual traffic from your computer network. Please try your request again later. <a href="#" onclick="document.getElementById(\'infoDiv0\').style.display=\'block\';">Why did this happen?</a><br><br>\n <div id="infoDiv0" style="display:none; background-color:#eee; padding:10px; margin:0 0 15px 0; line-height:1.4em;">\n This page appears when Google automatically detects requests coming from your computer network which appear to be in violation of the <a href="http://www.google.com/accounts/TOS">Terms of Service</a>. The block will expire shortly after those requests stop.<br><br>This traffic may have been sent by malicious software, a browser plug-in, or a script that sends automated requests. If you share your network connection, ask your administrator for help &mdash; a different computer using the same IP address may be responsible. <a href="http://www.google.com/support/bin/answer.py?answer=86640">Learn more</a><br><br>Sometimes you may see this page if you are using advanced terms that robots are known to use, or sending requests very quickly.\n </div><br>\n \n IP address: 74.125.19.24<br>Time: 2012-10-09T17:48:20Z<br>URL: http://gdata.youtube.com/action/GetUploadToken<br>\n </div>\n</div>\n</body>\n</html>\n', 
    'reason': 'Service Unavailable' 
} 

我使用的YouTube從用戶上傳視頻,也可用於顯示現有的視頻(用戶只需輸入視頻網址)。 有沒有人知道它不工作的可能原因?

+0

發佈一些代碼,具體說明您如何使用API​​可能會幫助我們幫助您。 –

+0

您是否看到此頁面在響應中鏈接? http://support.google.com/websearch/bin/answer.py?hl=en&answer=86640&rd=1 –

回答

0

我正在使用gdata python庫。在我的視頻模型中定義 我已經yt_service屬性:

def yt_service(self): 
    try: 
     return self._yt_service 
    except AttributeError: 
     yt_service = gdata.youtube.service.YouTubeService()    
     yt_service.developer_key = settings.SYNCR_YT_DEVKEY 
     yt_service.email = settings.SYNCR_YT_EMAIL 
     yt_service.password = settings.SYNCR_YT_PASS 
     yt_service.ProgrammaticLogin() 
     self._yt_service = yt_service 
     return yt_service 

然後創建上傳表單,查看呼叫yt_service.GetFormUploadToken當檢索上傳令牌。它在這裏失敗了。

相關問題