thunky-monk / kawhi

stats.nba.com library :basketball:
MIT License
17 stars 1 forks source link

Example fails with ResponseTimeout #2

Closed zmbc closed 7 years ago

zmbc commented 7 years ago

When I run the example, this is what I see:

~/kawhi/example$ stack exec kawhi-example
kawhi-example: HttpExceptionRequest Request {
  host                 = "stats.nba.com"
  port                 = 80
  secure               = False
  requestHeaders       = []
  path                 = "/stats/teamdashboardbygeneralsplits"
  queryString          = "?Conference&DateFrom&DateTo&Division&GameScope&GameSegment&LastNGames=0&LeagueID=00&Location&MeasureType=Advanced&Month=0&OpponentTeamID=0&Outcome&PaceAdjust=N&PerMode=PerGame&Period=0&PlayerExperience&PlayerPosition&PlusMinus=N&PORound=0&Rank=N&Season=2015-16&SeasonSegment&SeasonType=Regular%20Season&ShotClockRange&StarterBench&TeamID=1610612759&VsConference&VsDivision"
  method               = "GET"
  proxy                = Nothing
  rawBody              = False
  redirectCount        = 10
  responseTimeout      = ResponseTimeoutDefault
  requestVersion       = HTTP/1.1
}
 ResponseTimeout

Any idea what could be causing this?

thunky-monk commented 7 years ago

Yea, the stats.nba.com API is a bit unstable. Looks like it changed to require some headers. Hopefully https://github.com/thunky-monk/kawhi/pull/3 is the right fix.

Thanks for letting me know.