I know we can create a block in the text editor we have in WordPress.
But I would like to keep it simple and just push my article using the rest API like this:
headers = {‘Content-Type’: ‘application/x-www-form-urlencoded’}
data = {
‘title’ : f'{article\_title}’,
‘content’ : f'{article\_block}’,
‘status’ : ‘publish’ #or draft
}
​
​
​
r = [requests.post](https://requests.post)(url= ROOT + ‘/wp-json/wp/v2/posts’, data=data, headers=headers, auth=(user, password))
Do you know how I kind add a spotify player in my “article\_block” variable in python ?
I can add text, and it creates a block (paragraph) but I can’t get a similar result than the specific Spotify block !
