|
||||
|
|
Bug Reports Forum Have a bug to report? Please post here. |
|
Thread Tools |
08-19-2019, 08:56 AM | #1 |
Minors (Rookie Ball)
Join Date: Jun 2014
Posts: 47
|
Game Logs HTML malformed or just plain messy in some cases
League files has been FTP'd as RodanLeague.lg.zip
I've been working on a Python program to extract individual pitch data fro the html games logs. This program uses the BeautifulSoup python library to basically do a web scrape of these html files. Looking for certain elements and text I can extract data like called strike vs a swinging strike, at bat out comes, exit velocity, etc. I've found that a lot of my game logs have malformed html that result in my program not working in all cases. Just viewing the html from these logs that are bad result in really messy output in a browser. Some examples of things I find in the html are substitution into html not happening Code:
<tr> <td valign="top" width="268px" class="dl"> Batti[%B] Batting: LHB <a href="../players/player_13000.html">Aydin [%N] 0-0:[%N] 0[%N] 1-0: Ground o[%N] 0-1: Ball </td> <td class="dl" width="700px"> 1-1: Foul Ball, location: 2F*1-2: Ball*2-2: Foul Ball, location: 2F*2-2: Ball*3-2: Base on Balls </td> </tr> link tags that are lacking the 'href' element Code:
<th colspan="2" align="left" style="padding:4px 0px 4px 4px;"> Eden Garden Appleseeds batting - Pitching for Port Berth Armada : LHP <a /players/player_10031.html">Jamal Saiki</a> </th> I've attached the logs from my program as well as a two of the bad logs. My almanac contains quite a few more. Last edited by mnapoleon; 08-19-2019 at 09:24 AM. |
08-19-2019, 09:14 AM | #2 |
Minors (Rookie Ball)
Join Date: Jun 2014
Posts: 47
|
I've attempted to follow the instructions on uploading leagues files but the link in the sticky thread with instructions just leads to a generic 'Not Found' page.
This is the link I'm talking about. https://support.ootpdevelopments.com...p-developments |
08-19-2019, 09:24 AM | #3 |
Minors (Rookie Ball)
Join Date: Jun 2014
Posts: 47
|
Actually I figured out how to FTP the league file. It is now there as RodanLeague.lg.zip
|
Bookmarks |
|
|