正文增加字数上限、去除微博视频提示
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user