post = dict(
dateCreated = xmlrpc.client.DateTime(),
description = "# hello",
title = "title",
enclosure = {'length': 0},
source = {},
)
proxy = xmlrpc.client.ServerProxy(config["url"])
s = proxy.metaWeblog.newPost('', config['username'], config['password'],post,True)
如题,按照这种写法没有解析成一级标题,而我用MetaWeblog API获取我markdown文档确是原始的markdown文档。难道发布接口只能转换成html进行发布吗?
您好,给分类传值[Markdown]
我修改成了:
post = dict(
dateCreated = xmlrpc.client.DateTime(),
description = "# hello",
title = "title",
enclosure = {'length': 0},
categories = ['Markdown'],
)
但是还是没有解析markdown的语法
@Hello_wshuo: 需要改为categories = ['[Markdown]']
@dudu: 果然好使了,多谢!
非常感谢,完美解决了我的问题