diff --git a/main.go b/main.go index 48eadbb..af4b231 100644 --- a/main.go +++ b/main.go @@ -65,7 +65,7 @@ func main() { log.Println("🎉 Game Imports completed successfully 🏀") importBoxScores(db) - log.Println("🎉 Related Box-Score Imports completed successfully 📦") + log.Println("🎉 Related Box Score Imports completed successfully 📦") log.Println("🏀 ALL Imports completed successfully ✅ 🙌") diff --git a/services/box_score_scrape_service.go b/services/box_score_scrape_service.go index 45932a6..96c66f0 100644 --- a/services/box_score_scrape_service.go +++ b/services/box_score_scrape_service.go @@ -86,9 +86,10 @@ func parseAndStoreLineScore(db *gorm.DB, doc *goquery.Document, gameID string) e ls.Q2 = mustAtoi(row.Find(`td[data-stat="2"]`).Text()) ls.Q3 = mustAtoi(row.Find(`td[data-stat="3"]`).Text()) ls.Q4 = mustAtoi(row.Find(`td[data-stat="4"]`).Text()) - ls.OT1 = mustAtoi(row.Find(`td[data-stat="OT1"]`).Text()) - ls.OT2 = mustAtoi(row.Find(`td[data-stat="OT2"]`).Text()) - ls.OT3 = mustAtoi(row.Find(`td[data-stat="OT3"]`).Text()) + // FIX: Corrected the data-stat attribute for overtime periods. + ls.OT1 = mustAtoi(row.Find(`td[data-stat="1OT"]`).Text()) + ls.OT2 = mustAtoi(row.Find(`td[data-stat="2OT"]`).Text()) + ls.OT3 = mustAtoi(row.Find(`td[data-stat="3OT"]`).Text()) ls.Total = mustAtoi(row.Find(`td[data-stat="T"]`).Text()) lineScores = append(lineScores, ls) })