正文增加字数上限、去除微博视频提示

This commit is contained in:
anian
2026-03-15 23:39:04 +08:00
parent 54fb39d15c
commit b1f30b374f
6 changed files with 9987 additions and 20 deletions
@@ -177,9 +177,11 @@ public class RssSyncReconciler implements Reconciler<RssSyncReconciler.Request>,
String description = friendPost.getSpec().getDescription();
//解析html内容转换成文本
if (StringUtils.isNotEmpty(description)){
description = CommonUtils.parseAndTruncateHtml2Text(description, 200);
description = CommonUtils.parseAndTruncateHtml2Text(description, 100000);
String regexp = "[ *|\\s*]*";
description = description.replaceFirst(regexp, "").trim();
String weiboVideoRegex = "\\s[^\\s]*的微博视频 视频无法显示,请前往微博视频观看。";
description = description.replaceAll(weiboVideoRegex, "");
friendPostSpec.setDescription(description);
}
client.create(friendPost);