gdata youtube api 302'该文件已移动'

时间:2010-05-19 08:06:09

标签: python api youtube youtube-api gdata

我正在尝试使用python gdata库获取YouTube Feed。 身份验证功能正常,yt_service.ProgrammaticLogin()工作,生成subauth令牌工作等,但当我尝试获取一些feed(GetMostRecentVideoFeed,GetYouTubeVideoEntry,甚至GetFeed,以及任何其他)时,我得到:

RequestError: {'status': 302, 'body': '<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">\n<TITLE>302 Moved</TITLE></HEAD><BODY>\n<H1>302 Moved</H1>\nThe document has moved\n<A HREF="http://www.google.com">here</A>.\r\n</BODY></HTML>\r\n', 'reason': 'Redirect received, but redirects_remaining <= 0'}

302到'google.com'???

我甚至试图从谷歌在线教程做一些事情,我得到同样的错误。发生了什么事?

1 个答案:

答案 0 :(得分:1)

解决。

您需要将ssl = False添加到YouTubeService对象。但是在文档中没有看到任何关于它的内容。

yt = gdata.youtube.service.YouTubeService()
yt.ssl = False