Quote:
Originally Posted by Greg Marra
http://frcfeed.appspot.com/2009/ct/q...ations/results
Code:
Traceback (most recent call last):
File "/base/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", line 507, in __call__
handler.get(*groups)
File "/base/data/home/apps/frcfeed/3.337367731534012182/FRCFeed.py", line 160, in get
self.get_results(request)
File "/base/data/home/apps/frcfeed/3.337367731534012182/FRCFeed.py", line 129, in get_results
self.response.out.write(toXML(self,data[request["When"].capitalize()+' Matches'],'Match'))
KeyError: 'Qualifications Matches'
FIRST substantially overhauled their web site, which breaks a lot of TBA's automated schedule, match results, and attendance scraping. I very well may end up using frcfeed as an input to TBA, given that it produces data in such a cleaner format than FIRST does.
Would it be possible to produce JSON instead of XML? It's easier to parse in many situations.
[s]Also, how frequently is this data refreshed? Do you generate it live off FIRST's servers, or are you caching it?[/s]
I see there's a one minute cache time.
Thanks!
-Greg
|
Greg, the error was caused by the word being Qualifications instead of Qualification.[s]I haven't had time to really make a good way of checking the request. It is basically doing a string split and some basic guessing at the moment. Im hoping to overhaul that around the same time I get the JSON stuff working. I'll get on the JSON option sometime in the next couple days. (Aiming for Sunday although it depends on how much time I have tonight.)[/s]
Here is my gift for you
http://frcfeed.appspot.com/2009/detroit/rankings/json
The request system has been made a little more robust. It still doesn't report what you are missing but it will dump you to the instruction page.
You can request it in xml, json, or human. Human just makes it easier to read for a human, best way is to just try it out and see yourself. It really shouldn't be used for stuff, it is mostly for debugging on my part.
If you find any bugs just let me know. Just for reference, the URL is now:
frcfeed.appspot.com/{year/}event/{qualification or elimination/}what{/format}