安装python wordpress xmlrpc
pip install python_wordpress_xmlrpc
删除文章
调用删除文章方法DeletePost()
def delete_post(self, post_id):
post = self.get_post(post_id)
if not post:
print(f'文章不存在:{post_id}')
return
# post = WordPressPost()
post.id = self.wp.call(posts.DeletePost(post.id))
print(f'\nid={post.id}')
print(f'已删除发布文章:{post.title}')
return post.id
当前文章价值7.82元,扫一扫支付后添加微信提供帮助!(如不能解决您的问题,可以申请退款)

评论已关闭!