From 047fa7cb6f216d790f55f59088e2e897a2be3737 Mon Sep 17 00:00:00 2001 From: chekayo <9827969+chekayo@user.noreply.gitee.com> Date: Sun, 7 Dec 2025 17:11:11 +0800 Subject: [PATCH] fix: fix --- xiaohongshu/publish.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/xiaohongshu/publish.go b/xiaohongshu/publish.go index c7635c4..fd7a29c 100644 --- a/xiaohongshu/publish.go +++ b/xiaohongshu/publish.go @@ -7,8 +7,6 @@ import ( "os" "strings" "time" - "unicode" - "unicode/utf8" "github.com/go-rod/rod" "github.com/go-rod/rod/lib/input" @@ -57,11 +55,6 @@ func (p *PublishAction) Publish(ctx context.Context, content PublishImageContent return errors.New("图片不能为空") } - trimmedContent := strings.TrimRightFunc(content.Content, unicode.IsSpace) - if utf8.RuneCountInString(trimmedContent) > 1000 { - return errors.New("正文内容不能超过1000个字符") - } - page := p.page.Context(ctx) if err := uploadImages(page, content.ImagePaths); err != nil { @@ -440,4 +433,4 @@ func isElementVisible(elem *rod.Element) bool { } return visible -} +} \ No newline at end of file