Парсер медии с кастомным разрешением

This commit is contained in:
lost+skunk 2024-07-30 01:20:00 +03:00
parent 4d166ad5f9
commit 42ea2980f9
9 changed files with 105 additions and 106 deletions

View file

@ -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