Фиксы некоторых аттачей
This commit is contained in:
parent
b7e33ae37b
commit
d1b6ef97b3
@ -991,7 +991,7 @@ async def process_attachment(attachment, token=None):
|
|||||||
link_name = link_name[:200] + '...'
|
link_name = link_name[:200] + '...'
|
||||||
photo_content = ''
|
photo_content = ''
|
||||||
if 'photo' in attachment[atype]:
|
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', '​')
|
photo_name = attachment[atype]['photo'].get('text', '​')
|
||||||
if not photo_name:
|
if not photo_name:
|
||||||
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"]}'
|
market_album_url = f'https://vk.com/market{attachment[atype]["owner_id"]}?section=album_{attachment[atype]["id"]}'
|
||||||
photo_content = ''
|
photo_content = ''
|
||||||
if attachment[atype].get('photo'):
|
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'<a href="{photo_url or ""}">​</a>'
|
photo_content = f'<a href="{photo_url or ""}">​</a>'
|
||||||
title = f'<a href="{market_album_url}">{attachment[atype].get("title", "") or "🛒 Подборка Товаров"}</a>'
|
title = f'<a href="{market_album_url}">{attachment[atype].get("title", "") or "🛒 Подборка Товаров"}</a>'
|
||||||
count = f'\n<i>Число товаров:</i> {attachment[atype]["count"]}'
|
count = f'\n<i>Число товаров:</i> {attachment[atype]["count"]}'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user