1

我正在尝试使用 python gdata 库获取 YouTube 提要。身份验证功能工作正常,yt_service.ProgrammaticLogin() 工作,生成 subauth 令牌工作等,但是当我尝试获取一些提要(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”???

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

4

1 回答 1

1

解决了。

您需要将 ssl=False 添加到 YouTubeService 对象。不过,在文档中看不到任何关于它的内容。

yt = gdata.youtube.service.YouTubeService()
yt.ssl = False
于 2010-05-19T09:17:07.477 回答