2010-05-19 79 views
1

我正在尝试使用python gdata库获取YouTube供稿。 身份验证功能工作正常,yt_service.ProgrammaticLogin()的作品,产生subauth令牌作品等,但是当我试图得到一些饲料(GetMostRecentVideoFeed,GetYouTubeVideoEntry,甚至GetFeed,以及任何其他),我得到:gdata youtube api 302'文档已移动'

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 to'google.com'?

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

回答

1

已解决。

您需要将ssl = False添加到YouTubeService对象。尽管在文档中没有看到它。

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