From a47b34fba179306aad77a8fa0475656372d8dc8f Mon Sep 17 00:00:00 2001 From: OnerInce Date: Tue, 12 May 2026 13:01:39 +0200 Subject: [PATCH] fix: add nba.com Referer header to live endpoint requests cdn.nba.com now returns 403 for liveData requests without an nba.com Referer (ScoreBoard, PlayByPlay, BoxScore, Odds). Add it to the live HTTP default headers, matching the stats client. Fixes #670 --- src/nba_api/live/nba/library/http.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nba_api/live/nba/library/http.py b/src/nba_api/live/nba/library/http.py index 38289981..f21bdaf5 100644 --- a/src/nba_api/live/nba/library/http.py +++ b/src/nba_api/live/nba/library/http.py @@ -10,6 +10,7 @@ "Cache-Control": "max-age=0", "Connection": "keep-alive", "Host": "cdn.nba.com", + "Referer": "https://www.nba.com/", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36", }