收藏
回答

公众号新建草稿API, 正文(content)使用html,上传草稿后系统会自动加入空行?

# Read the content of the HTML file
with open(html_file_path, 'r', encoding='utf-8') as file:
    html_content = file.read()

# Article details with the extracted HTML content
articles = [
    {
        "title": "API测试",  # Chinese title
        "content": html_content,
        "thumb_media_id": "PdEzMawG529MXCtwub53gRYEoq6kuxaaQwa0HuVwrURiqiZTBjkpvrzlFEj4cfs2",
    }
]
#----------------以下是html_content---------------------------#
line 1

line 2

line 3

line 4



使用了https://developers.weixin.qq.com/doc/offiaccount/Draft_Box/Add_draft.html上传html草稿后,行和行之间插入了空行。

看到之前的用户也反馈过类似问题。

https://developers.weixin.qq.com/community/develop/doc/00046c6febcd282048a0492116b800

请问这个问题可以怎么解决? 谢谢。


回答关注问题邀请回答
收藏
登录 后发表内容