Giter Club home page Giter Club logo

Comments (2)

trevor-viljoen avatar trevor-viljoen commented on August 25, 2024

MLB hasn't been updating scoreboard.xml during spring training.

http://gd2.mlb.com/components/game/mlb/year_2018/month_03/day_01/scoreboard.xml

from mlbgame.

trevor-viljoen avatar trevor-viljoen commented on August 25, 2024

This should get you the output you were looking for.

for game in games:
    try:
        stats = mlbgame.team_stats(game.game_id)
        home_team = game.home_team
        away_team = game.away_team
        print('{0} ({1}) at {2} ({3})'.format(away_team, stats.away_batting.r, home_team, stats.home_batting.r))
    except ValueError:
        print('Unable to find data for game_id: {0}'.format(game.game_id))
Marlins (3) at Mets (2)
Nationals (2) at Mets (1)
Nationals (7) at Mets (3)
Tigers (2) at Mets (4)
Astros (5) at Mets (9)
Yankees (11) at Mets (4)
Astros (5) at Mets (2)
Astros (6) at Mets (1)
Marlins (7) at Mets (6)
Orioles (4) at Mets (4)
Nationals (5) at Mets (9)
Unable to find data for game_id: 2018_03_23_slnmlb_nynmlb_1
Unable to find data for game_id: 2018_03_25_miamlb_nynmlb_2
Unable to find data for game_id: 2018_03_29_slnmlb_nynmlb_1
Unable to find data for game_id: 2018_03_31_slnmlb_nynmlb_1

from mlbgame.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.