0
I’m trying to make a program that automatically posts on a website of mine, which I did on the blogger. How can I do this? My code is like this:
from googleapiclient.discovery import build
Key = "****************************************"
BlogId = "6904625182923640825"
blog = build('blogger', 'v3', developerKey=Key)
def getblog():
title = []
url = []
NextPage = None
while 1:
resp = blog.posts().list(blogId=BlogId, maxResults=1, pageToken = NextPage).execute()
print(resp)
try:
title.append(resp['items'][0]['title'])
url.append(resp['items'][0]['url'])
except KeyError:
break
NextPage = resp.get('nextPageToken', None)
if NextPage is None:
break
return title, url, resp
title, url, resp = getblog()
(I set the key to ****************************************)
You have already asked this: https://answall.com/q/490798/5878
– Woss