Steve Baumgarten Wrote: > GoCubs wrote: > > > Steve is correct, the score data now appears to be coming in on one > > single line. Hopefully that's the only change. I believe one of the > > other sports (NFL?) was similar so I'll have to refresh myself in how > I > > handled it. > > I definitely recommend a simple regexp to add a newline before every > tag > you expect to see on a new line, e.g.: > > $content =~ s#<div#\n<div#i > > or whatever tag/tags are appropriate and that make it work. Basically a > > one-liner, then split the string as usual and iterate as usual. > > > Believe it or not, SuperDateTime was my first Perl programming > attempt > > and I didn't expect it to become the monster it has. > > Ladies and gentlemen, the history of computer programming in one > sentence. ;-) > > > Had I known I probably would have organized it differently and > > explored HTML::Parser. Right now I'm comfortable with how everything > > works and luckily so far the HTML source hasn't changed that > > much/often. > > Absolutely. What I should be doing is recoding that MLB subroutine to > use HTML::Parser and then offering it to you for review/approval. I'll > look into it when I have a bit of time. It's a very useful module, but > it does take a bit of playing with to really get a gut feel for. Had > you > started with it rather than ad-hoc parsing, you might not have gotten > as > far as you have, especially given this is the first perl programming > you've done. > > > I'll look into the code and post a fix when I can. > Thanks again Steve for your post. I actually have a new version on my local machine that appears to do the trick. The new HTML code this season looks like it's easier to parse... I just split up the line by individual games and then proceed as normal. Right now it works with upcoming and completed games, but I have to wait for an active game to see if it works in that case as well.
When I have a chance I'll take a look at the HTML::Parser module, but for now I kind of like diving into the raw HTML code. Thanks again Greg -- GoCubs ------------------------------------------------------------------------ GoCubs's Profile: http://forums.slimdevices.com/member.php?userid=312 View this thread: http://forums.slimdevices.com/showthread.php?t=14327 _______________________________________________ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/lists/listinfo/plugins