diff --git a/post_parser.py b/post_parser.py index 8ce075b..3289258 100644 --- a/post_parser.py +++ b/post_parser.py @@ -285,8 +285,8 @@ class PostParser: forward_username = getattr(sender_chat, "username", None) if forward_username: forward_link = f'{forward_title} (@{forward_username})' - return f'
Forwarded from {forward_link}

' - return f'
Forwarded from {forward_title}

' + return f'
--- Forwarded from {forward_link} ---

' + return f'
--- Forwarded from {forward_title} ---

' return None @@ -540,9 +540,8 @@ class PostParser: def _generate_html_body(self, message: Message) -> str: content_body = [] - test_fwd = self._format_forward_info(message) test_reply = self._format_reply_info(message) - logger.error(f"Forward info: {test_fwd}, Reply info: {test_reply}") + logger.error(f"Reply info: {test_reply}") if reply_html := self._format_reply_info(message): content_body.append(reply_html) @@ -564,7 +563,7 @@ class PostParser: if forward_html: content_body.append(forward_html) # Forward info content_body.append(f'{text_html}') if poll_html: content_body.append(poll_html) # Poll - if message.forward_origin: content_body.append(f"
---- Forward post end ----") # Forward info end + if message.forward_origin: content_body.append(f"
--- Forwarded post end ---") # Forward info end content_body.append(f'
') html_body = '\n'.join(content_body)