Author Topic: Generate code replacement files for MLB from ESPN.com data  (Read 7275 times)

Offline gmstone

  • Newcomer
  • *
  • Posts: 12
    • View Profile
Here is a crude script that will allow you to generated code replacement files by scraping the data off of espn.com.

Basically, you can selet two teams, enter the value you wish to use as the prefix, and click the submit button.  What will appear on the browser screen is a list of player names and prefix/number codes in what appears to be an unformated format.  Click File/Save As and save the file as a .txt file.  This can then be setup in PM.  This has only been tested with the latest versions of IE and Firefox in a Windows environment.  If there is interest, I will expand this to include other leagues when the seasons start in the fall.

Feel free to email with questions: mike@stopactionsports.com

http://stopactionsports.com/extract.php

Offline gmstone

  • Newcomer
  • *
  • Posts: 12
    • View Profile
Re: Generate code replacement files for MLB from ESPN.com data
« Reply #1 on: May 22, 2006, 07:37:23 AM »
I made a few changes to the script over the weekend.  The data will now be saved in a file which can be downloaded, eliminating the "save as" step.  Also, the file will now include codes that have the players name preceeded by his position and/or team name.

For example, if you specify a prefix of 'nyy' for the Yankees, you will get the following results:

nyy2 will insert Derek Jeter

Preceed that with a 't' and it will include the team name:
tnyy2 will insert New York Yankees Derek Jeter

Preceed with a 'p' for position:

pnyy2 will insert shortstop Derek Jeter

And finally team and position can be included with 'tp':

tpnyy2 will insert New York Yankees shortstop Derek Jeter

Again, this was tested modestly in only a windows environment and using the latest versions of IE and Firefox.