API Method "wall.getById" [Vkontakte]?

ss = vk.method("wall.getById", {"posts":str (id[i])+"_"+str(post_id)})
s = ss["comments"]["can_post"]
print(s)

Error:
File "bot_com.py", line 61, in
s = ss["comments"]["can_post"]
TypeError: list indices must be integers or slices, not str
March 20th 20 at 11:44
1 answer
March 20th 20 at 11:46
{
"response": [{
"id": 340393,
"from_id": -1,
"owner_id": -1,
"date": 1466181337,
"marked_as_ads": 1,
"post_type": "post",
"text": "",
"copy_history": [{
"id": 19972,
"owner_id": -19542789,
"from_id": -19542789,
"date": 1466082642,
"post_type": "post",
"text": "Simplify feedback, adding to your website widget Write to us. With it, your customers can quickly contact you through messages Vkontakte and ask any questions.

In addition, using references of the form vk.me/[short link to your page or community] you always have the option to share your contact through the promotion of records on social networks, and users — to quickly check the price or advice about services.

Read more about innovation read the blog Vkontakte: new.vk.com/blog/vkme.",
"attachments": [{
"type": "link",
"link": {
"url": "new.vk.com/blog/vkme",
"title": "VK.me — a quick access message exchange",
"caption": "new.vk.com",
"description": "OpenID is a short address for messages — vk.me. Now write a message to a friend or ask the company became even easier — for a direct link you can get to the dialogue or share it with others.",
"photo": {
"id": 420804501,
"album_id": -2,
"owner_id": 6291322,
"photo_75": "https://pp.vk.me/...bea/pPdnQ6-zZG8.jpg",
"photo_130": "https://pp.vk.me/...beb/vgQtNi0PVKU.jpg",
"photo_604": "https://pp.vk.me/...bec/LE_Cv5sLaC4.jpg",
"width": 150,
"height": 52,
"text": "",
"date": 1466063017
},
"is_external": 1
}
}],
"post_source": {
"type": "vk"
}
}],
"can_delete": 1,
"can_pin": 1,
"post_source": {
"type": "vk"
},
"comments": {
"count": 0,
"can_post": 0
},
"likes": {
"count": 65,
"user_likes": 0,
"can_like": 1,
"can_publish": 1
},
"reposts": {
"count": 7,
"user_reposted": 0
}
}]
}

Find more questions by tags PythonAPIVKontakte