Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Kenny Ho
    Hello, I'm interested in your project. I'm a bit inexperienced and wonder if you could help me use your code.
    Anyone else seeing 403s again?
    has anyone been using this recently?
    yeah i use it
    @anchitkolla is there anywhere that has a simple demo of usage... something along these lines... https://camo.githubusercontent.com/8787c76716c0e20b96eaca6ec070422eff0952d9/687474703a2f2f692e696d6775722e636f6d2f68326b594f79642e676966
    from here
    @mc3mc yes
    Callum Finlayson

    @jbaylin @kennyho-code I am going to assume some basic knowledge, but even with none, the right googling should get you up and running:

    1) download/install "ipython Notebook" or Jupyter (very similar thing, but I like ipython notebook)
    2) download the (awesome) github nba_py project (assume you already have, as you're here)
    3) install the nba_py - instructions are in the readme file, but basically, just run: 'pip install nba_py'
    4) start ipython notebook, once it's up and running in the command line (you will know it's running if you see the " In [ 1 ] : " prompt:
    In [ 1 ]: from nba_py import game
    In [ 2 ]: MyGameInformation = game.BoxscoreSummary('0041400122')
    In [ 3 ]: MyGameInformation.game_summary()
    The returned data is:
    2015-04-20T00:00:00 1 0041400122 3 Final 20150420/MILCHI 1610612741 1610612749 2014 4 TNT Q4 - TNT 1

    There is lots more to it, but that's a simple example, and should get you started I think.... I am very new to this, just downloaded it, so am no expert on the available calls... I do want to say well done to @seemethere Great job!!

    Kevin Wang
    Does anyone know why my pull request is doing some weird timeout in travis-CI? #85
    "No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
    Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received"
    when test_nba_py.py should be taking a few seconds
    Eli Uriegas
    Last time that happened Travis was down.
    Kevin Wang
    i see
    doesn't seem like it's down, though
    Kevin Wang
    still can't seem to get it to work. should i submit an issue?
    I have installed it. But I dont know how to use it. Where is the API for help?
    Nick Porter
    Anyone having issues with the API? Nothing seems to be working for me.
    Hows this going guys?
    Kevin Wang
    still active
    Kevin Wang
    wondering if anyone knows the easiest way to get "average number of points scored from minute 42 to 48" for a team? Would I just have to go play-by-play for every game they played that I want to look at?
    Or does the api have some kind of minute range filter for game-by-game stats?
    Hi folks. I've been programming a GUI tool for quite a while with this module, but haven't used it in a while. I am getting a 403 error in the stack trace and the callback is coming from loading the 2016-2017 season, and looking to access the first team ID (ATL). Does anyone else get this error? Using python 3.6 and newest pycharm
    In [ 1 ]: from nba_py import game
    In [ 2 ]: MyGameInformation = game.BoxscoreSummary('0041400122')
    In [ 3 ]: MyGameInformation.game_summary()
    MyGameInformation = game.BoxscoreSummary('0041400122')
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "C:\Users\Owner\AppData\Local\Programs\Python\Python36-32\lib\site-packages\nba_py\game.py", line 25, in init
    'EndRange': end_range})
    File "C:\Users\Owner\AppData\Local\Programs\Python\Python36-32\lib\site-packages\nba_py__init__.py", line 85, in _get_json
    File "C:\Users\Owner\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\models.py", line 935, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
    requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: http://stats.nba.com/stats/boxscoresummaryv2?EndPeriod=0&EndRange=0&GameID=0041400122&RangeType=0&Season=2016-17&SeasonType=Regular+Season&StartPeriod=0&StartRange=0
    The link works as its accessible through a browser but for some reason the request comes back saying it was denied... will keep investigating but am curious if others experience this
    Could be the USER-AGENT header is outdated, or along those lines when making the HTTP request. Also the current_season constant is outdated. Can the author make these changes? I can gen a PR if necessary
    Of course after I get this working