MLB Boxscore Question??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • roasthawg
    SBR MVP
    • 11-09-07
    • 2990

    #1
    MLB Boxscore Question??
    Does anyone here know of a site where I can download all of the boxscores from the current MLB season to excel? I have a nice little DB going from retrosheet but I need the current up-to-date game logs from this season and they don't have them. Thanks.
  • MrX
    SBR MVP
    • 01-10-06
    • 1540

    #2
    Nope, but the mlb.com boxscores have remained blessedly consistent for years so it's relatively easy to write code to automatically download and parse them. Same goes for the gamelogs if you need data not found in the boxscores. You can also get pfx data this way which isn't available from retrosheet.
    Comment
    • Sinister Cat
      SBR MVP
      • 06-03-08
      • 1090

      #3
      Further to MrX's response, the stuff on mlb.com is available in xml format, and is indeed easy to parse.

      Here's a link to a boxscore. Note that you can navigate through the directory structure (with a web browser) to look around and see what else they have, including pbp data in the "inning" and "pbp" directories for each game.

      Comment
      • roasthawg
        SBR MVP
        • 11-09-07
        • 2990

        #4
        So you gotta use a data scraper to get them into excel right? I mean without copying and pasting one game at a time?

        I'm trying to figure out this data scraping stuff right now...no easy chore. I've downloaded a couple of trial editions to see if I can get them to do what I need and have had some luck so far but it's tough. Thanks for the help.
        Comment
        • Sinister Cat
          SBR MVP
          • 06-03-08
          • 1090

          #5
          Originally posted by roasthawg
          So you gotta use a data scraper to get them into excel right? I mean without copying and pasting one game at a time?

          I'm trying to figure out this data scraping stuff right now...no easy chore. I've downloaded a couple of trial editions to see if I can get them to do what I need and have had some luck so far but it's tough. Thanks for the help.
          Yeah, you'd need to have something to get the data with. But it is not that hard to write a simple program to get the data you want and put it into a comma-delimited format or directly into a mysql database or whatever. Might be easier than using an available scraper since the mlb format is easy to parse. I don't know, never used a scraper.

          I'm scraping mlb boxscore stuff using Tcl with its http and htmlparse packages (there are also xml parsers available for Tcl).

          Here's a blog I came across where the author is doing it using Groovy: http://kousenit.wordpress.com/2007/08/

          Perl would also be a popular choice for this kind of thing.
          Comment
          Search
          Collapse
          SBR Contests
          Collapse
          Top-Rated US Sportsbooks
          Collapse
          Working...