nba_api
nba_api copied to clipboard
Playoff Picture reporting incorrect information
Currently, the playoff picture endpoint is reporting incorrect series scores. It says New York is up 3-0 over Atlanta in reality it is tied at 1-1 for example.
I am manually getting the endpoints via node-fetch and saw the same thing when using postman. My code:
const fetch = require('node-fetch')
let year = new Date()
year = year.getFullYear()
year = year - 1
let url = 'https://stats.nba.com/stats/playoffpicture?LeagueID=00&SeasonID=2' + year
let headers = {
Referrer: 'https://stats.nba.com'
}
let bracket;
fetch(url, {method: 'GET', headers: headers}).then(response => response.json()).then(data =>
bracket = data
).then(data => {
let teams = {
east: [
bracket.resultSets[0].rowSet[0][2],
bracket.resultSets[0].rowSet[1][2],
bracket.resultSets[0].rowSet[2][2],
bracket.resultSets[0].rowSet[3][2],
bracket.resultSets[0].rowSet[3][5],
bracket.resultSets[0].rowSet[2][5],
bracket.resultSets[0].rowSet[1][5],
bracket.resultSets[0].rowSet[0][5]
],
west: [
bracket.resultSets[1].rowSet[0][2],
bracket.resultSets[1].rowSet[1][2],
bracket.resultSets[1].rowSet[2][2],
bracket.resultSets[1].rowSet[3][2],
bracket.resultSets[1].rowSet[3][5],
bracket.resultSets[1].rowSet[2][5],
bracket.resultSets[1].rowSet[1][5],
bracket.resultSets[1].rowSet[0][5]
]
}
let playoffpicture = {
east: [
{
highSeed: teams.east[0],
lowSeed: teams.east[7],
highGames: bracket.resultSets[0].rowSet[0][7],
lowGames: bracket.resultSets[0].rowSet[0][8]
},
{
highSeed: teams.east[1],
lowSeed: teams.east[6],
highGames: bracket.resultSets[0].rowSet[1][7],
lowGames: bracket.resultSets[0].rowSet[1][8]
},
{
highSeed: teams.east[2],
lowSeed: teams.east[5],
highGames: bracket.resultSets[0].rowSet[2][7],
lowGames: bracket.resultSets[0].rowSet[2][8]
},
{
highSeed: teams.east[3],
lowSeed: teams.east[4],
highGames: bracket.resultSets[0].rowSet[3][7],
lowGames: bracket.resultSets[0].rowSet[3][8]
}
]
}
console.log(playoffpicture.east)
})
@swar
@reesericci - Way, way, way behind on getting questions answered and issues fixed. Did you say you saw the exact same behavior in the python code as you did Postman when calling the endpoints directly? This seems to indicate that it was an issue on the NBA side and not a bug in the code. Please advise. Thanks!