trim spaces from titles

This commit is contained in:
Seraphim Strub 2024-05-29 21:37:48 +00:00
parent 1d5c7056be
commit 0b97f282e2
6 changed files with 12 additions and 6 deletions

View file

@ -8,6 +8,7 @@ import (
"log/slog"
"net/http"
"regexp"
"strings"
)
type SteamStruct struct {
@ -139,7 +140,7 @@ func (e SteamStruct) Load() error {
continue
}
id := fmt.Sprintf("%v%v", e.idPrefix, appID)
title := game.Data.Name
title := strings.TrimSpace(game.Data.Name)
url := fmt.Sprintf("%v%v", e.baseUrl, appID)
e.deals[id] = Deal{