From 42ea2980f9be365c97b17d5273270fa1862ee9fc Mon Sep 17 00:00:00 2001 From: lost+skunk Date: Tue, 30 Jul 2024 01:20:00 +0300 Subject: Парсер медии с кастомным разрешением MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comments.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'comments.go') diff --git a/comments.go b/comments.go index 928de44..24d2d53 100644 --- a/comments.go +++ b/comments.go @@ -11,7 +11,7 @@ type Thread struct { ID int `json:"commentId"` Parent int `json:"parentId"` - Posted time + Posted timeStamp Author bool `json:"isAuthorHighlited"` Desctiption string @@ -35,7 +35,7 @@ type Comments struct { } // 1 - комментарии поста; 4 - комментарии на стене группы или пользователя -func CommentsFunc(postid string, cursor string, page int, typ int) (cmmts Comments) { +func GetComments(postid string, cursor string, page int, typ int) (cmmts Comments) { for x := 0; x <= page; x++ { ujson( "dashared/comments/thread?typeid="+strconv.Itoa(typ)+ @@ -60,7 +60,7 @@ func CommentsFunc(postid string, cursor string, page int, typ int) (cmmts Commen } e := json.Unmarshal([]byte(m), &content) - err(e) + try(e) for _, a := range content.Blocks { cmmts.Thread[i].Comment = a.Text -- cgit v1.2.3