轻松将文章交叉发布到中
medium-crosspost的Python项目详细描述
中横杆
将文章交叉发布到medium的python脚本。
伴随着this blog post,深入到Ghost和Medium之间的交叉投递。
安装:
pip install medium-crosspost
基本用法:
from medium_crosspost import MediumCrosspost
input_data = {
"title": "Fantastic Article Name!",
"canonicalUrl": "https://www.example.com/fantastic-article-name",
"integrationToken": "super-secret-medium-integration-token",
"content": "<html><head></head><body>Content is all about actual HTML-encoded article content.</body></html>",
"tags": "can,be,a,list,or,comma,separated,string",
}
crosspost = MediumCrosspost(input_data)
result = crosspost.post()