panzarino/mlbgame

Trying to print all games in current month

Open

#86 geöffnet am 5. Apr. 2018

Auf GitHub ansehen
 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (116 Forks)batch import
enhancementhelp wantedquestion

Repository-Metriken

Stars
 (509 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Hi, I am trying to do something similar to what is on the documentation with printing games, but I have used datetime to get the current month and year and use that to build the list of upcoming and recent games. However, whenever I try to print anything in the future or current timeframe, the line that calls mlbgame.games() does not ever complete running.

Here is what I have:

from __future__ import print_function import mlbgame import datetime year = datetime.date.today().year month = datetime.date.today().month new_month = mlbgame.games(year,month,home='Red Sox', away='Red Sox') games = mlbgame.combine_games(new_month) for game in games: print(game)

Contributor Guide