pythonvk

How to get all comments count in vk_api(wall)


I have need to get all user count and id of user using vk_api python lib.

vk.wall.getComments()

Can get only 100 out time(wall post have 35000), but it have offset, how can use offset to get dict?

I tried to use this, but code give me KeyError.


Solution

  • You need repeat command with offset=0, offset=100, and so while you have not empty response. Use list.extend method to make big one list.