A whopping 79 SBR points up for grabs!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • matthew919
    SBR Sharp
    • 11-21-12
    • 421

    #1
    A whopping 79 SBR points up for grabs!
    I'm in need of assistance here, and I'm hoping someone can help. I really want to find an "example" script that will help teach me the art of scraping data from mlb.com, preferably using python's BeautifulSoup library. If you can provide a script that can scrape a few stats for all games in a single day, all my SBR points are belong to you.

    So basically, something that scrapes the innings pitched for each starting pitcher, as well as the number of walks and hits allowed for each inning would be fantastic. Well, I actually need a lot more data than that, but the easiest way for me to learn how to do the rest of it myself would be to start with a very simple script that is commented, and continue from there. In return, I'm happy to post my finished script that scrapes all the data I am interested in. Actually, I'm surprised something like this hasn't been posted somewhere in the past.

    Anyone with the expertise feel like sharing?

    Thanks,
    Matt
  • Miz
    SBR Wise Guy
    • 08-30-09
    • 695

    #2
    If you're lazy like me, you can go to rent-a-coder and get one of those guys to do it for probably $300. Money well spent !

    Then you're the boss and can tell them exactly which parameters you need. Then you get both things accomplished... you learn how to do it and you don't actually have to waste your time banging your head against the wall trying to blaze that trail yourself.
    Comment
    • matthew919
      SBR Sharp
      • 11-21-12
      • 421

      #3
      Thanks Miz. But 300 bucks is too rich for my blood, unfortunately. If no one is feeling generous, I'll set aside a Saturday for it at some point.

      Maverick- $300 is your answer I guess...
      Comment
      • bztips
        SBR Sharp
        • 06-03-10
        • 283

        #4
        OP, I have exactly what you're looking for -- Python script that scrapes from mlb. I will try to post it later today when I get to my home computer.
        Comment
        • matthew919
          SBR Sharp
          • 11-21-12
          • 421

          #5
          Yes! Thank you sir!

          I just tried to send you a 25 point advance, but was denied, saying you either could not receive them or I can't send them... any idea why that might be? I'll retry later.

          EDIT: Weird. It just let me give you a total of two points (1 point separately, for two instances), then stopped letting me give you any at all.
          Last edited by matthew919; 01-07-13, 04:48 PM.
          Comment
          • stikymess
            SBR MVP
            • 05-19-10
            • 3288

            #6
            Originally posted by matthew919
            Yes! Thank you sir!

            I just tried to send you a 25 point advance, but was denied, saying you either could not receive them or I can't send them... any idea why that might be? I'll retry later.
            You have to be an SBR Pro to send points, non-pro can send a max of 2 per day.
            Comment
            • matthew919
              SBR Sharp
              • 11-21-12
              • 421

              #7
              Well then, I guess I'll sign up for the installment plan. Don't worry bz; I'm good for it. Stellar credit score right here.
              Comment
              • ProPicker713
                SBR Hall of Famer
                • 12-15-10
                • 6788

                #8
                go to the baseballpress and dailybaseballdata they have some great statisical info.
                Comment
                • bztips
                  SBR Sharp
                  • 06-03-10
                  • 283

                  #9
                  python stuff

                  OK, here's my python script and supporting files to scrape starting lineups (using MLB player codes) from all games on a given day. Obviously you could enhance it to scrape other data from the boxscores.

                  Normally I would reference "yesterday" relative to today's actual date, but I've hard-coded a specific date so you can test it out and see that it works.

                  I'm sure there are more efficient ways to do the Python coding, but I've taught myself just enough to get by.

                  Don't worry about the points; I don't really need them.

                  Good luck with your scraping!
                  Attached Files
                  Comment
                  • matthew919
                    SBR Sharp
                    • 11-21-12
                    • 421

                    #10
                    Thanks a million; this is great! I'm going to post my R script that parses play by play and game log data from Retrosheet- if you have any interest in that sort of thing. (Might be a few days til I can get it together though...)
                    Comment
                    SBR Contests
                    Collapse
                    Top-Rated US Sportsbooks
                    Collapse
                    Working...