View Single Post
  #1   Spotlight this post!  
Unread 29-04-2009, 17:11
Andrew Schreiber Andrew Schreiber is offline
Joining the 900 Meme Team
FRC #0079
 
Join Date: Jan 2005
Rookie Year: 2000
Location: Misplaced Michigander
Posts: 4,062
Andrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond repute
FIRST Event Data in XML format

Good Afternoon,

A recent project required me to parse the team history and event pages from the USFirst.org website. Then another project forced me to redo the same task, obviously I reused most of the code but this became quite tiresome because handling everything as text strings has some major drawbacks, foremost among them being that I have to use regular expressions for everything. As a result I decided to create some scripts that will scrape the site and return XML data for various things. For example, one of the scripts pulls the ranking data from an event. The following is a small example from the Lansing Event. (I truncated the results, the actual output does contain all the teams)

Code:
<Event>
        <Ranking>
                <Rank>1</Rank>
                <Team_Number>67</Team_Number>
                <Wins>12</Wins>
                <Losses>0</Losses>
                <Ties>0</Ties>
                <Plays>12</Plays>
                <QS>24.00</QS>
                <RS>51.75</RS>
                <MP>117</MP>
        </Ranking>
        <Ranking>
                <Rank>2</Rank>
                <Team_Number>1</Team_Number>
                <Wins>10</Wins>
                <Losses>2</Losses>
                <Ties>0</Ties>
                <Plays>12</Plays>
                <QS>20.00</QS>
                <RS>46.83</RS>
                <MP>95</MP>
        </Ranking>
</Event>
My primary question is, would the FIRST community be interested in these scripts? If so, what pages would you like to see (so I can prioritize writing them) They are being written in Python but the heavy lifting is all done by regular expressions so they should be adaptable to any language.
__________________




.

Last edited by Andrew Schreiber : 29-04-2009 at 17:15. Reason: My Grammar was bad, I tried to make it less bad.