import requests
# https://stackoverflow.com/questions/48589954/can-i-use-the-rest-api-for-a-site-hosted-on-wordpress-com
# https://developer.wordpress.com/docs/oauth2/
# https://developer.wordpress.com/apps/
access_token = requests.post("https://public-api.wordpress.com/oauth2/token", data={
'client_id': <Redacted>,
'client_secret': '<Redacted>',
'grant_type': 'password',
'username': '<Redacted>',
'password': '<Redacted>',
}).json()['access_token']
# https://developer.wordpress.com/docs/api/console/
# https://developer.wordpress.org/rest-api/reference/posts/
a = requests.post('https://public-api.wordpress.com/rest/v1.1/sites/<Redacted>/posts/<Redacted>', headers={
'Authorization': 'BEARER ' + access_token
}, data = {
'content': '<Redacted>'
})
<Redacted> muss ersetzt werden