mirror of
https://github.com/nprasad2077/NBA_Go.git
synced 2026-09-22 14:05:13 +00:00
refresh
This commit is contained in:
@@ -62,7 +62,7 @@ func importPlayerTotalsPlayoffsScrape(db *gorm.DB) {
|
||||
func importGameSchedules(db *gorm.DB) {
|
||||
months := []string{"june"}
|
||||
|
||||
for season := 2025; season <= 2025; season++ {
|
||||
for season := 2025; season <= 2026; season++ {
|
||||
log.Printf("--- Starting Game Schedule Import for Season: %d ---", season)
|
||||
for _, month := range months {
|
||||
if err := services.FetchAndStoreGameSchedule(db, season, month); err != nil {
|
||||
@@ -146,7 +146,7 @@ func importPlayerShotCharts(db *gorm.DB) {
|
||||
|
||||
// importMarkPlayoffGames marks games as playoff using the dedicated Basketball Reference playoff schedule.
|
||||
func importMarkPlayoffGames(db *gorm.DB) {
|
||||
for season := 2025; season <= 2025; season++ {
|
||||
for season := 2025; season <= 2026; season++ {
|
||||
if err := services.FetchAndMarkPlayoffGames(db, season+1); err != nil {
|
||||
log.Printf("playoff marking failed for %d: %v", season, err)
|
||||
}
|
||||
|
||||
@@ -50,17 +50,17 @@ func main() {
|
||||
// Run all DB migrations + import steps exactly once
|
||||
db := config.InitDB(true)
|
||||
|
||||
// importPlayerAdvanced(db)
|
||||
// log.Println("🎉 Player Advanced Import completed successfully")
|
||||
importPlayerAdvanced(db)
|
||||
log.Println("🎉 Player Advanced Import completed successfully")
|
||||
|
||||
// importPlayerAdvancedPlayoffs(db)
|
||||
// log.Println("🎉 Player Advanced Playoffs Import completed successfully")
|
||||
importPlayerAdvancedPlayoffs(db)
|
||||
log.Println("🎉 Player Advanced Playoffs Import completed successfully")
|
||||
|
||||
// importPlayerTotalsScrape(db)
|
||||
// log.Println("🎉 Player Totals (scraped) Import completed successfully")
|
||||
importPlayerTotalsScrape(db)
|
||||
log.Println("🎉 Player Totals (scraped) Import completed successfully")
|
||||
|
||||
// importPlayerTotalsPlayoffsScrape(db)
|
||||
// log.Println("🎉 Player Playoffs (scraped) Import completed successfully")
|
||||
importPlayerTotalsPlayoffsScrape(db)
|
||||
log.Println("🎉 Player Playoffs (scraped) Import completed successfully")
|
||||
|
||||
importGameSchedules(db)
|
||||
log.Println("🎉 Game Imports completed successfully 🏀")
|
||||
|
||||
Reference in New Issue
Block a user