From 163562c04e4e11bb109cbb9f3718a31f7b8cb82e Mon Sep 17 00:00:00 2001
From: Ronny Gunawan <3048897+ronnygunawan@users.noreply.github.com>
Date: Mon, 1 Jan 2024 09:53:44 +0700
Subject: [PATCH] Fix primbon parsing
---
BotNet.CommandHandlers/Primbon/PrimbonCommandHandler.cs | 2 +-
BotNet.Services/Primbon/PrimbonScraper.cs | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/BotNet.CommandHandlers/Primbon/PrimbonCommandHandler.cs b/BotNet.CommandHandlers/Primbon/PrimbonCommandHandler.cs
index cb02a2f..b39ecbc 100644
--- a/BotNet.CommandHandlers/Primbon/PrimbonCommandHandler.cs
+++ b/BotNet.CommandHandlers/Primbon/PrimbonCommandHandler.cs
@@ -50,7 +50,7 @@ await _telegramBotClient.SendTextMessageAsync(
{{title}}: {{string.Join(", ", traits)}}
Hari Larangan
- {{sangar}}{{restriction}}
+ {{sangar}}! {{restriction}}
Chinese Calendar
Clash: {{clash}} Evil: {{evil}}
diff --git a/BotNet.Services/Primbon/PrimbonScraper.cs b/BotNet.Services/Primbon/PrimbonScraper.cs
index 040814a..0ef9a4e 100644
--- a/BotNet.Services/Primbon/PrimbonScraper.cs
+++ b/BotNet.Services/Primbon/PrimbonScraper.cs
@@ -48,7 +48,7 @@ HttpClient httpClient
}
return (
- Title: title.Trim(),
+ Title: title.Trim(' ', ':'),
Traits: traits.Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries)
);
}
@@ -96,8 +96,8 @@ HttpClient httpClient
return (
JavaneseDate: body.Trim(),
- Title: title.Trim(),
- Description: desc.Trim()
+ Title: title.Trim(' ', '!'),
+ Description: desc.Trim(' ', '!')
);
}
}