Sign in to follow this  
Followers 0
archrival

MLB.com Statistics Reader

3 posts in this topic

#1 ·  Posted (edited)

I'm a huge into baseball statistics, and I like to work with them in spreadsheets. I know of this Lahman DB, but it's not updated for the 2005 season yet, nor is updated each day for currently progressing seasons. So I decided to write my own script to rip stats from the mlb.com webpage and generate CSV files with them. The main problem is it requires an internet connection and it needs to download each file everyday (only for an ongoing season; at the end of a season or for past seasons, it will use currently existing files) and those files add up to 200 MB+. It has allowed me to generate some nice spreadsheets for the 2005 season. I'm anticipating it will work fine for the upcoming season as well. If you have all of the HTML files, it takes about 15 minutes to generate the 3 CSV files. It obviously takes longer to download all files as needed. Currently it won't download if the files exist, I'll modify that later on once the season starts. Give me some feedback, I know there aren't many stats junkies that also use AutoIt, but I thought I'd share.

Edit: Removed redundant code, added age, handedness

MLBstats.au3

Edited by archrival

Share this post


Link to post
Share on other sites



Great idea... Thanks for the script archrival!


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Great idea... Thanks for the script archrival!

Thanks for your help, too!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0