This question has already been answered:

I make a bot for the news channel in Telegram, I encountered such a problem: I get json from vk api, but I can't parse it. Tell me how to do this? json view:

response: [{ id: 210700286, first_name: 'Lindsey', last_name: 'Stirling', city: { id: 5331, title: 'Los Angeles' }, photo_50: 'https://pp.vk.me/...f6e/4-funfNRMwg.jpg', verified: 1 }] 

I understand that I can not parse it because of the response, but how to remove it?

Reported as a duplicate by Visman participants, aleksandr barakin , cheops , Denis , Pavel Mayorov Oct 31 '16 at 14:39 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • one
    The example in question is not json . If it were json, it would not matter where you got it from (you could remove vk, telegram from the question). Try to create a minimal code sample — make a request in any way to vk api and show what you get in response ( print(repr(response)) ). Describe what information you want to extract and what exactly is your problem with the code. If it is possible to make a request to vk outside the telegram, then remove the mention of the telegram from the question (solve one problem at a time). - jfs

1 answer 1

 import json result=json.loads(text)