From d1b6ef97b3afad576e567b29094df1fa977e85bf Mon Sep 17 00:00:00 2001 From: Sergey Date: Sun, 4 Oct 2020 22:47:14 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=D1=8B=20=D0=BD=D0=B5?= =?UTF-8?q?=D0=BA=D0=BE=D1=82=D0=BE=D1=80=D1=8B=D1=85=20=D0=B0=D1=82=D1=82?= =?UTF-8?q?=D0=B0=D1=87=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vk_messages.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vk_messages.py b/vk_messages.py index e22c663..f03c087 100644 --- a/vk_messages.py +++ b/vk_messages.py @@ -991,7 +991,7 @@ async def process_attachment(attachment, token=None): link_name = link_name[:200] + '...' photo_content = '' if 'photo' in attachment[atype]: - photo_url = attachment[atype]['photo'][await get_max_photo(attachment[atype]['photo'])] + photo_url = attachment[atype]['photo']['sizes'][-1]['url'] photo_name = attachment[atype]['photo'].get('text', '​') if not photo_name: photo_name = '​' @@ -1019,7 +1019,7 @@ async def process_attachment(attachment, token=None): market_album_url = f'https://vk.com/market{attachment[atype]["owner_id"]}?section=album_{attachment[atype]["id"]}' photo_content = '' if attachment[atype].get('photo'): - photo_url = attachment[atype]['photo'][await get_max_photo(attachment[atype])] + photo_url = attachment[atype]['photo']['sizes'][-1]['url'] photo_content = f'' title = f'{attachment[atype].get("title", "") or "🛒 Подборка Товаров"}' count = f'\nЧисло товаров: {attachment[atype]["count"]}'