blogger - gdata autentication trouble python -
i ran awhile python script post articles on blogspot blog. ran smoothly until started auth error
requesterror: {'status': 401, 'body': 'user not have permission create new post', 'reason': 'unauthorized'}
i can't understand how fix reading gdata documentation.
could please suggest me how do?
thank you
here part of code doesn't work anymore:
from gdata import service import gdata import atom blogger_service = service.gdataservice('xxxxxx','xxxxxx') blogger_service.service = 'blogger' blogger_service.account_type = 'google' blogger_service.server = 'www.blogger.com' blogger_service.programmaticlogin() def createpublicpost(blogger_service, blog_id, title, content,tags): entry = gdata.gdataentry() entry.title = atom.title('xhtml', title) entry.content = atom.content(content_type='html', text=content) tag in tags : category = atom.category(term=tag, scheme="http://www.blogger.com/atom/ns#") entry.category.append(category) return blogger_service.post(entry, '/feeds/%s/posts/default' % blog_id)
now there api version 3.0...
this old version obsolete , no longer works, apparently...
you can find more here: https://developers.google.com/blogger/ https://developers.google.com/blogger/docs/3.0/using/
and if have questions authentication, maybe links help:
Comments
Post a Comment