Артём КорсаковУченик (145)
3 года назад
с первым typeerror
ак со вторым: Traceback (most recent call last):
File "main.py", line 16, in
id = json.loads(poisk['items'])['id']
File "C:\Users\artem\AppData\Local\Programs\Python\Python37\lib\json\__init__.py", line 341, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not list
вывод по типу: [{'id': 12345, 'from_id': -13345655, 'owner_id': -136436155, 'date': 1597212009, 'marked_as_ads': 0, 'post_type': 'post', 'text': '#tag \n \n— текст поста\n— ыфвафывафыва\n \nафывафвыаф', 'attachments': [{'type': 'photo', 'photo': дальше ссылки на фото