Update post / page using API + python

Edit – Solution:
the issue was that the url had http and not https, it seems i have to use the https version, although its weird I kept getting 200 response before.