如何获取用户在VK特定社区中留下的评论
📁 方法, python, 示例, 请求, 人工智能
如何获取特定用户在VK特定社区的帖子下留下的所有评论?
我研究了VK API中存在的所有方法,但尚未找到完成此任务的方法。
作为此任务的源数据,给出了社区的ID。
以下是我尝试实现的一个示例:
for i in range(200): url = ""https://api.vk.com/method/wall.get?owner_id=%s&offset=%s&count=1""%(self.text1.toplaintext(), i) response = requests.get(url).text parsed_string = json.loads(response) url1 = ""https://api.vk.com/method/wall.getComments?owner_id=%s&post_id=%s&count=100""%(self.text1.toplaintext(), parsed_string['response']['items'][0]['id'])