"用Python脚本更新Google Sites时出现403错误"

2024-10-05 10:03:34 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图更新我的google站点,但我一直得到这个

server responded with: 403, Not authorized to write to this feed

当我更新内容、创建新站点、在站点中创建新页面时,会发生这种情况。在

但是,我可以检索网站的内容,并看到它包含的网页。我是网站的创建者。另外,我使用clientLogin()为google站点提供身份验证。我计划运行这个脚本的服务器没有gui,因此我不能使用gauth或oath(除非somone有一种方法)。在


Tags: to内容server站点网站feedwithgoogle
1条回答
网友
1楼 · 发布于 2024-10-05 10:03:34

根据Google自己的说法,ClientLogin方法应该被OAuth取代。在

Important: ClientLogin has been officially deprecated as of April 20, 2012. It will continue to work as per our deprecation policy, but we encourage you to migrate to OAuth 2.0 as soon as possible.

我建议使用OAuth库,而不是一开始自己动手。
python-oauth2不错。在


编辑:谷歌在appengine模块中内置了OAuth API。在

from google.appengine.api import oauth

否则对于手工OAuth实现:oauth google using python(我不会在这里发布示例代码,因为他应该得到他能得到的ups。在

相关问题 更多 >

    热门问题