diff --git a/backend/internal/domain/discovery/crawler/festival_alarm.go b/backend/internal/domain/discovery/crawler/festival_alarm.go index ae1c661..f1c1496 100644 --- a/backend/internal/domain/discovery/crawler/festival_alarm.go +++ b/backend/internal/domain/discovery/crawler/festival_alarm.go @@ -120,10 +120,13 @@ func parseFestivalAlarm(data []byte, sourceURL string, year int) ([]RawEvent, er return events, nil } -// parseDateAttr reads the content="YYYY-MM-DD" attribute from a span and -// returns a *time.Time in UTC. Falls back to year for the year component if -// the attribute is absent or malformed (shouldn't happen in practice). +// parseDateAttr reads the content="YYYY-MM-DD" attribute from an itemprop +// span and returns a *time.Time in UTC. Returns nil if absent or malformed. +// The year parameter is accepted for signature symmetry with future sources +// that may not include full dates in their markup; it is intentionally unused +// here because festival-alarm always emits complete ISO dates. func parseDateAttr(s *goquery.Selection, year int) *time.Time { + _ = year content, exists := s.Attr("content") if !exists || content == "" { return nil @@ -132,7 +135,5 @@ func parseDateAttr(s *goquery.Selection, year int) *time.Time { if err != nil { return nil } - // The site always includes the correct year in the attribute; just validate. - _ = year return &t }