Open VladimirCores opened 3 years ago
Looks like something wrong with video, but I can't understand why, the attachment looks:
{
"type": "video",
"video": {
"access_key": "fde38d9e09f71df447",
"can_comment": 1,
"can_edit": 1,
"can_like": 1,
"can_repost": 1,
"can_subscribe": 1,
"can_add_to_faves": 1,
"can_add": 1,
"can_attach_link": 1,
"comments": 0,
"date": 1626588043,
"description": "Original video: https://vimeo.com/385536746",
"duration": 412,
"image": [
{
"height": 96,
"url": "https://i.mycdn.me/getVideoPreview?id=1498471074326&idx=5&type=39&tkn=lDnXGsFE4Nyl-TQlYG1g_weejjQ&fn=vid_s",
"width": 130,
"with_padding": 1
},
{
"height": 120,
"url": "https://i.mycdn.me/getVideoPreview?id=1498471074326&idx=5&type=39&tkn=lDnXGsFE4Nyl-TQlYG1g_weejjQ&fn=vid_m",
"width": 160,
"with_padding": 1
},
{
"height": 240,
"url": "https://i.mycdn.me/getVideoPreview?id=1498471074326&idx=5&type=39&tkn=lDnXGsFE4Nyl-TQlYG1g_weejjQ&fn=vid_l",
"width": 320,
"with_padding": 1
},
{
"height": 450,
"url": "https://i.mycdn.me/getVideoPreview?id=1498471074326&idx=5&type=39&tkn=lDnXGsFE4Nyl-TQlYG1g_weejjQ&fn=vid_x",
"width": 800,
"with_padding": 1
},
{
"height": 720,
"url": "https://i.mycdn.me/getVideoPreview?id=1498471074326&idx=5&type=39&tkn=lDnXGsFE4Nyl-TQlYG1g_weejjQ&fn=vid_w",
"width": 1280
},
{
"height": 180,
"url": "https://i.mycdn.me/getVideoPreview?id=1498471074326&idx=5&type=39&tkn=lDnXGsFE4Nyl-TQlYG1g_weejjQ&fn=vid_t",
"width": 320
},
{
"height": 405,
"url": "https://i.mycdn.me/getVideoPreview?id=1498471074326&idx=5&type=39&tkn=lDnXGsFE4Nyl-TQlYG1g_weejjQ&fn=vid_u",
"width": 720
}
],
"first_frame": [
{
"height": 405,
"url": "https://i.mycdn.me/getVideoPreview?id=1498471074326&idx=0&type=32&tkn=Xvq_oPiAUHK2KiAFLOBddlLcRmc",
"width": 720
},
{
"height": 270,
"url": "https://i.mycdn.me/getVideoPreview?id=1498471074326&idx=0&type=33&tkn=GADfJtWEzfCYjV1--IAbZRhIis0",
"width": 480
},
{
"height": 135,
"url": "https://i.mycdn.me/getVideoPreview?id=1498471074326&idx=0&type=34&tkn=a44cx32MATBSx-l7Wx-yUGDpEts",
"width": 240
},
{
"height": 72,
"url": "https://i.mycdn.me/getVideoPreview?id=1498471074326&idx=0&type=35&tkn=3SJ8xSoqOvCPLsYOZUQKW_6zMOA",
"width": 128
},
{
"height": 720,
"url": "https://i.mycdn.me/getVideoPreview?id=1498471074326&idx=0&type=37&tkn=e2t6DJWwDiC3oe8lbdkI8CTDebM",
"width": 1280
},
{
"height": 540,
"url": "https://i.mycdn.me/getVideoPreview?id=1498471074326&idx=0&type=38&tkn=mtdEnFuYxLe93bkefvHJGHtu0U4",
"width": 960
},
{
"height": 720,
"url": "https://i.mycdn.me/getVideoPreview?id=1498471074326&idx=0&type=39&tkn=5ReDlGLHxZIVYnQj0_lqxNkrxZA",
"width": 1280
}
],
"width": 1920,
"height": 1080,
"id": 456240206,
"owner_id": -48406435,
"title": "Empyreum",
"is_favorite": false,
"track_code": "video_679077a7_hq51_xXzXl6jQ-yW0pCFNBlC_OBqUZJZWbIrVnBSYrIMaDT8lfOehGNDdpaf3Qm5FU5w7euMycOCKc",
"type": "video",
"views": 61
}
},
And when I try to get it from VK API documentation, empty array returned: Video exists for sure: https://vk.com/invisart?z=video-48406435_456240206
Ok looks like I fixed the problem on line 85:
const apivideo = (await vkapi.video.get(`${video.owner_id}_${video.id}`)).response?.items[0]
However the result is not exactly what I'm expecting, the content looks like individual items not the one post: Is there any way of how to combine them all into one?
@VladimirCores Dunno, I need to totally refactor this shit 😅
Posting only text without attachments: