BurntSushi / nflgame

An API to retrieve and read NFL Game Center JSON data. It can work with real-time data, which can be used for fantasy football.
http://pdoc.burntsushi.net/nflgame
The Unlicense
1.27k stars 412 forks source link

Post Season PSA #356

Open ochawkeye opened 6 years ago

ochawkeye commented 6 years ago

Just a reminder.

If you want your schedule to update, you'll need to have nflgame\live.py\_CUR_SCHEDULE point to the postseason xml URL.

If you were pointing to the regular season URL and swap this, make sure to run python PATH\TO\PYTHON\scripts\nflgame-update-schedule --year 2017 --phase POST to update your schedule.

>>>import nflgame
>>>for game in nflgame.live._games_in_week(2017, 1, 'POST'):
       print game

{u'week': 1, u'meridiem': u'PM', u'gamekey': u'57490', u'season_type': u'POST', u'away': u'TEN', u'year': 2017, u'month': 1, u'eid': u'2018010600', u'time': u'4:35', u'home': u'KC', u'wday': u'Sat', u'day': 6}
{u'week': 1, u'meridiem': u'PM', u'gamekey': u'57491', u'season_type': u'POST', u'away': u'ATL', u'year': 2017, u'month': 1, u'eid': u'2018010601', u'time': u'8:15', u'home': u'LA', u'wday': u'Sat', u'day': 6}
{u'week': 1, u'meridiem': u'PM', u'gamekey': u'57492', u'season_type': u'POST', u'away': u'BUF', u'year': 2017, u'month': 1, u'eid': u'2018010700', u'time': u'1:05', u'home': u'JAX', u'wday': u'Sun', u'day': 7}
{u'week': 1, u'meridiem': u'PM', u'gamekey': u'57493', u'season_type': u'POST', u'away': u'CAR', u'year': 2017, u'month': 1, u'eid': u'2018010701', u'time': u'4:40', u'home': u'NO', u'wday': u'Sun', u'day': 7}
brn2prgrm commented 6 years ago

Thank you ochawkeye for helping me fix my script!!!

For me I had to run the update_sched.py script within the nflgame folder, with the same arguments. In case anyone has similar problems, I executed:

python PATH/TO/PYTHON/scripts/nflgame/update_sched.py --year 2017 --phase POST

In my Mac environment, the python scrips folder was located within 'Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages'

Thanks again!