mirror of
https://git.macaw.me/skunky/devianter.git
synced 2025-04-27 19:45:08 +03:00
Парсер медии с кастомным разрешением
This commit is contained in:
parent
4d166ad5f9
commit
42ea2980f9
9 changed files with 105 additions and 106 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue