mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-03-30 04:19:24 +02:00
fix alerts template
This commit is contained in:
parent
0d9112bc3a
commit
efbf7c2d67
1 changed files with 6 additions and 4 deletions
|
@ -72,17 +72,19 @@ async def main():
|
|||
|
||||
changes[file['status']].append(f'{status} <code>{changed_url}</code>')
|
||||
|
||||
alert_text = f'<b>New changes on Telegram sites</b>\n'
|
||||
alert_text = f'<b>New changes on Telegram sites</b>\n\n'
|
||||
|
||||
for i, [status, text_list] in enumerate(changes.items()):
|
||||
if not text_list:
|
||||
continue
|
||||
|
||||
alert_text += '\n'.join(text_list[:ROW_PER_STATUS]) + '\n'
|
||||
|
||||
if len(text_list) > ROW_PER_STATUS:
|
||||
count = len(text_list) - ROW_PER_STATUS
|
||||
alert_text += f'And <b>{count}</b> {status} actions more..'
|
||||
alert_text += f'And <b>{count}</b> {status} actions more..\n'
|
||||
|
||||
if i != len(changes.items()) - 1:
|
||||
alert_text += '\n'
|
||||
alert_text += '\n'
|
||||
|
||||
alert_text += f'<a href="{html_url}">View diff on GitHub...</a>'
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue