How can I add a thumbnail to a wordpress post using xmlrpclib Python library?

心已入冬 提交于 2019-12-04 19:44:36

You can use the wp.* calls in the xmlrpc interface to access WP specific functionality that does more than the metaweblog ones will.

First you would call server.wp.uploadFile or server.wp.getMediaLibrary to upload the thumbnail or find an existing one and fetch it's id. Then use this id in the content["post_thumbnail"] parameter to server.wp.newPost.

The WP API has docs for all of this.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!