gpt4 book ai didi

django html2text anchor 破坏

转载 作者:行者123 更新时间:2023-12-01 13:21:14 32 4
gpt4 key购买 nike

使用 MIMEMultipart('alternative') 发送 html 和 pain-text 时

将 html 转换为文本时,html 的 anchor 换行

http://127.0.0.1:8000/some-url/other-part-of-url

http://127.0.0.1:8000/some-

url/other-part-of-url

为什么会这样?

最佳答案

django html2text(content,baseUrl,length) 在构造函数中有 3 个参数,其中第三个是长度(默认 78)。您可以使用它来增加长度。

关于django html2text anchor 破坏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49854121/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com