diff --git a/post_parser.py b/post_parser.py index c1aa0ea..0ca7406 100644 --- a/post_parser.py +++ b/post_parser.py @@ -443,19 +443,17 @@ class PostParser: base_url = Config['pyrogram_bridge_url'] try: if photo := getattr(webpage, "photo", None): - logger.debug(f"Processing webpage with photo: message_id={message.id}, photo={photo}") if file_unique_id := getattr(photo, "file_unique_id", None): channel_username = self.get_channel_username(message) - url = f"{base_url}/media/{channel_username}/{message.id}/{file_unique_id}" - logger.debug(f"Generated media URL: {url}") + file = f"{channel_username}/{message.id}/{file_unique_id}" + digest = generate_media_digest(file) + url = f"{base_url}/media/{file}/{digest}" return ( f'