Re: post blog using python API

John Wood <[email protected]>
Newsgroups gmane.comp.web.blogger.api
Message-ID <CAPtEm2Qr2PS77NP=KoyG8NwvNSt=9F4aRP58LiEzkWYL6DrOCw@mail.gmail.com>
I believe the correct way is to switch to using oauth2.

However, I found that updating the gdata libary from Google fixed a similar
issue for me - although I'm not sure for how long.

on linux it was just

sudo pip install --upgrade gdata

if that doesn't work, try

sudo pip install --upgrade google-api-python-client

as well. I did both while working on this recently, but I think it was just
the first one that mattered.

oauth makes my head hurt, so I'm trying to avoid those changes for as long
as possible. That and the picasaweb api doesn't seem to have been updated,
and I need that one as well

On 30 June 2015 at 08:35, Tom <[email protected]> wrote:

> Hi Experts,
>
> I find a script to keep update my blog using python API failed with
> message:
>
> {'status': 401, 'body': 'User does not have permission to create new post', 'reason': 'Unauthorized'}
>
> I am using following code:
>
>   #email = "email--addr--###gmail.com"
>   #password =  "PassWord"
>   #blog_id = "2711*********08"
>
>
>   blogger_service = gdata.service.GDataService(email, password)
>   blogger_service.source = 'exampleCo-exampleApp-1.0'
>   blogger_service.service = 'blogger'
>   blogger_service.account_type = 'GOOGLE'
>   blogger_service.server = 'www.blogger.com'
>   blogger_service.ProgrammaticLogin()
>
>   entry = gdata.GDataEntry()
>   entry.title = atom.Title('xhtml', title)
>   entry.content = atom.Content(content_type='html', text=blog_content)
>
>   return blogger_service.Post(entry, '/feeds/%s/posts/default' % blog_id)
>
> This works for the past several years, but failed from June 22.
> What should I do to fix the issue?
>
> Thanks,
> Tom
>
> --
> You received this message because you are subscribed to the Google Groups
> "Blogger Developer Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/bloggerdev.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Blogger Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/bloggerdev.
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.