FanPost

BECW3: The Advent of Live Scoring & What It Means For Future Live Posts

Ladies and very rarely gentle men,

I have cracked the code.

2862610_o_medium

After a few days' worth of teaching myself rudimentary java skillz, cursing at the MMA Playground servers for crashing and countless trial and error runs, I have managed to make a web scraping tool magically extract fight picks from MMA Playground. As soon as this part of the equation was completed, the seeds had been sown.

If MMA Playground's servers don't collapse right after the picking deadline, this means that UFC 146 will be the first event in BECW history to feature LIVE SCORING. Yes, you read that right - once the result of a bout is known, it will be possible to calculate the scores for every single player in the BECW and by extension, keep up with every team matchup as the action unfolds.

Follow the jump for a short introduction to the programming behind the magic (I get to brag a little, right?) and a couple of thoughts on what this could and/or should mean to live posts on BE. I've put all the tech-y stuff in blockquotes so you can easily skip past it if you don't care.

I use a nifty, free application called screen-scraper. Here are the steps I took:

1. Scrape every player's unique User ID from MMA Playground

I had already done this using another, inferior scraper. It basically just accessed our team roster, clicked on the link to every player's profile and then copied a link "View my picks history" which contained the User ID

2. The first steps of scraping

First, the scraper has to go to MMA Playground

Then, it has to insert my username and password in the relevant fields, then click "sign in"

3. Access a URL containing fight picks

Every player's picks can be accessed (after the picking deadline) at mmaplayground.com/picks.aspx?UID=<USER ID>&EID=<EVENT ID>

I got OpenOffice Calc to spit out URL's to every player's UFC on Fuel 3 picks, then saved it as a CSV file

I set up the scraper to automatically load one line of the CSV file at a time and use that line as the URL to be accessed after login in

4. Extract the fight picks

I got the scraper to return one player's picks. From the HTML code, I found the relevant bits of code that indicated who had been picked:

<td class="AC PlPr Brb Was~@RIGHT@~"><strong>~@WINNER@~</strong><br />
~@ROUND@~<br />
~@METHOD@~</td>
<td class="AC PlPr Wbg Brb">

Since these picks are from an event where the results are already available, I also extracted info on whether the pick was correct or not (RIGHT).

This line of code basically tells the scraper that whenever it finds something that starts with "<td class="AC PlPr Brb Was", it should extract the relevant fields (WINNER, ROUND, METHOD)

5. Export the extracted picks

Each time the scraper found a matching bit of code, a javascript I wrote told it to export WINNER, ROUND, METHOD, RIGHT as well as the player's name to a CSV file. Each value is separated by tabulators and each set of picks is separated by a line break.

6. Calculate results

Once I had each player's picks listed, OpenOffice did the rest of the work.

I set up cells that matched the fighter a player had picked with the actual result. If there was a match, the number "5" would be outputted.

Same goes for round and method (if the winner had been picked properly), those being worth 2 points each.

I then set up the a Sum field for each pick that added the numbers and also factored in Underdog bonus and Hot Bout bonus if applicable.

I then used a simple SUMIF function to get each player's total score.

I compared the calculated scores to the actual scores on PG and verified that every score I had calculated was true.


There you have it! It took about 10 minutes for the scraper to extract every fight pick for each of the 132 players, meaning that I should theoretically be able to get a shared Google Docs spreadsheet live about 30 minutes after the picking deadline on Saturday - as long as PG's servers don't crash. There is also a small - but significant - risk that MMA PG wise up to my scraping and block my IP address but given the marginal server load of loading 132 pages, I hope and believe this isn't going to be an issue.

Why should I care about this?

I'm sure many of you are asking this question. If you're part of the BECW, it should be obvious - it's mutherfuking live scoring! Even if you're not, this new development should still benefit you. With an easily accessible spreadsheet containing every score, this means that posts like "+11!!!!!", "I'm at 49, HOW MANY POINTS DO YOU HAVE KRCAMPBELL?" and "I picked Mark Hunt by 3rd round submission" could - and should - become much more scarce, if not disappear entirely.

While live scoring opens up a whole can of worms in terms of possible trash talk during the event, I figured this thing out because I thought it would be a win/win solution for either side in the meta Civil War that is the Civil War about the Civil War, also known as the Cory Braiterman Conundrum. Many people have stated that they enjoyed the Strikeforce live post because of the lack of BECW chatter, so why don't we make an effort to keep the inane - and soon to be redundant - comments about our current scores at a minimum?

\The FanPosts are solely the subjective opinions of Bloody Elbow readers and do not necessarily reflect the views of Bloody Elbow editors or staff.

X
Log In Sign Up

forgot?
Log In Sign Up

Forgot password?

We'll email you a reset link.

If you signed up using a 3rd party account like Facebook or Twitter, please login with it instead.

Forgot password?

Try another email?

Almost done,

Join Bloody Elbow

You must be a member of Bloody Elbow to participate.

We have our own Community Guidelines at Bloody Elbow. You should read them.

Join Bloody Elbow

You must be a member of Bloody Elbow to participate.

We have our own Community Guidelines at Bloody Elbow. You should read them.

Spinner

Authenticating

Great!

Choose an available username to complete sign up.

In order to provide our users with a better overall experience, we ask for more information from Facebook when using it to login so that we can learn more about our audience and provide you with the best possible experience. We do not store specific user data and the sharing of it is not required to login with Facebook.

tracking_pixel_5349_tracker