From 01fdc117e052456d288ff600067d2d108ae6a494 Mon Sep 17 00:00:00 2001 From: long Date: Sat, 11 Oct 2025 01:02:22 -0500 Subject: [PATCH] changes --- src/components.templ | 2 +- src/scrapers.go | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components.templ b/src/components.templ index 94c683c..621bdfd 100644 --- a/src/components.templ +++ b/src/components.templ @@ -10,7 +10,7 @@ templ TemplEventPage(e event.Event, upcoming []event.ListUpcomingEventsRow) { - MMA Schedule + { e.Name }
diff --git a/src/scrapers.go b/src/scrapers.go index f27cb56..649b9a6 100644 --- a/src/scrapers.go +++ b/src/scrapers.go @@ -224,7 +224,7 @@ func ScrapeUFCEvent(client ClientScraper, e *event.Event) error { func ScrapeUFCFight(s *goquery.Selection) *event.Fight { fight := event.Fight{} - fight.Weight = strings.Replace(TextContent(s, ".c-listing-fight__class-text"), " Bout", "", -1) + fight.Weight = strings.ReplaceAll(TextContent(s, ".c-listing-fight__class-text"), " Bout", "") fight.FighterA = ScrapeUFCFighter(s, "red") fight.FighterB = ScrapeUFCFighter(s, "blue") @@ -239,6 +239,9 @@ func ScrapeUFCFighter(s *goquery.Selection, color string) *event.Fighter { image, exists := s.Find(".c-listing-fight__corner-image--" + color + " img").First().Attr("src") if exists { + if strings.HasPrefix(image, "/") { + image = UFC_URL + image + } fighter.Image = image }