This is what i cant figure out an its driving me nuts. My thought was that its one of the lookaheads and i wasnt sure i was doing them correctly because i had changed them so many times to get it to work. So Ill try to do what you suggested an see if it makes a difference.Yincognito wrote: ↑September 3rd, 2023, 8:53 pm I did notice, however, that at times the skin doesn't display anything, even though it used to do for the same thing - not sure yet what would be the reason, maybe you're not accounting for spaces in all places.
It is currently September 29th, 2023, 2:23 pm
Mlb Live Scores
-
- Posts: 75
- Joined: June 8th, 2015, 10:39 pm
Re: Mlb Live Scores
-
- Rainmeter Sage
- Posts: 6059
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Mlb Live Scores
Don't forget about spaces too, if necessary. If you want to have a better idea of what's there to help you extract data from it, you can use WebFormatter.com to do it - just paste the JSON you're getting in that box, click Format and save it somewhere on your computer for easier viewing (Notepad++ displays it nicely if you set the Language to Javascript from the menu): Obviously, you should keep in mind that after formatting, there will be a lot of spaces, tabs and newline characters added (that don't exist in the original output from the site), so this helps more with identifying the fields, values and what you need, and not entirely when designing the regexes. Personally, I do my tests with the help of offline local files where I save both the original and the formatted version of what I interrogate online. It helps by not polling the site too often to get banned or similar, by the way, and the changes to the URL option are minor, via commenting lines:jake2456 wrote: ↑September 3rd, 2023, 9:07 pm This is what i cant figure out an its driving me nuts. My thought was that its one of the lookaheads and i wasnt sure i was doing them correctly because i had changed them so many times to get it to work. So Ill try to do what you suggested an see if it makes a difference.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 75
- Joined: June 8th, 2015, 10:39 pm
Re: Mlb Live Scores
I changed all the lookaheads to the way you said need to be
and made a few small changes to a few of them and now seems to all be working correctly. Past Present and Future games seem to be display correctly now. I had tryed a way to do them similar to your way at one point but they didnt work. So thank you for that correction on how its supposed to be. Much appreciated. Now i can look at giving this thing an updated look.
Code: Select all
(?(?=.*"innings".*"num":1,.*"home".*"runs":.*,.*"away".*"runs":.*,).*"innings".*"num":1,.*"home".*"runs":(.*),.*"away".*"runs":(.*),)
-
- Rainmeter Sage
- Posts: 6059
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Mlb Live Scores
No problem, glad it worked out eventually. Good luck with the rest of the updating.jake2456 wrote: ↑September 3rd, 2023, 10:09 pm I changed all the lookaheads to the way you said need to beand made a few small changes to a few of them and now seems to all be working correctly. Past Present and Future games seem to be display correctly now. I had tryed a way to do them similar to your way at one point but they didnt work. So thank you for that correction on how its supposed to be. Much appreciated. Now i can look at giving this thing an updated look.Code: Select all
(?(?=.*"innings".*"num":1,.*"home".*"runs":.*,.*"away".*"runs":.*,).*"innings".*"num":1,.*"home".*"runs":(.*),.*"away".*"runs":(.*),)

-
- Posts: 75
- Joined: June 8th, 2015, 10:39 pm
Re: Mlb Live Scores
Few more things to do an i think itll be finished. Should have it uploaded tonight or tomorrow night.
Preview:
Preview:
You do not have the required permissions to view the files attached to this post.
-
- Posts: 75
- Joined: June 8th, 2015, 10:39 pm
Re: Mlb Live Scores
Ive got a small bug im trying to work out but im not sure how to fix it.
Im using this:
To Capture this:
But the "runs":0, section doesnt always exist for that inning until either a run is scored or the inning is over and they add another inning("num":7 section)
For example:
So in turn it jumps ahead to the next instance: which always exists and captures that instead those giving the wrong values.
Ive tryd a few different ways. Even thought i had it solved with this:
But for some reason this never captures a value for the away runs even if they exist.
Im using this:
Code: Select all
(?(?=.*"num":6,.*"home".*"runs":.*,.*"away".*"runs":.*,).*"num":6,.*"home".*"runs":(.*),.*"away".*"runs":(.*),)
Code: Select all
{"num":6,"ordinalNum":"6th","home":{"runs":0,"hits":0,"errors":0,"leftOnBase":0},"away":{"runs":0,"hits":2,"errors":0,"leftOnBase":0}}]
For example:
Code: Select all
{"num":6,"ordinalNum":"6th","home":{"hits":0,"errors":0,"leftOnBase":0},"away":{"runs":1,"hits":2,"errors":0,"leftOnBase":1}}],"teams":{"home":{"runs":1,"hits":3,"errors":0,"leftOnBase":3},"away":{"runs":1,"hits":8,"errors":0,"leftOnBase":7}},
Code: Select all
"teams":{"home":{"runs":1,"hits":3,"errors":0,"leftOnBase":3},"away":{"runs":1,"hits":8,"errors":0,"leftOnBase":7}},
Ive tryd a few different ways. Even thought i had it solved with this:
Code: Select all
(?(?=.*"num":6,"ordinalNum":".*","home":{"runs":.*,).*"num":6,"ordinalNum":".*","home":{"runs":(.*),)(?(?=.*"num":6,"ordinalNum":".*","home":{"runs":.*,"hits":.*,"errors":.*,"leftOnBase":.*},"away":{"runs":.*,).*"num":6,"ordinalNum":".*","home":{"runs":.*,"hits":.*,"errors":.*,"leftOnBase":.*},"away":{"runs":(.*),)
-
- Posts: 19
- Joined: May 8th, 2015, 8:15 pm
- Location: Manasquan, NJ USA
Re: Mlb Live Scores
Can you post what you currently have? I'm not very good at this but, I can take a look.
-
- Posts: 75
- Joined: June 8th, 2015, 10:39 pm
Re: Mlb Live Scores
Yea. Its pretty much done I think, besides the bug, an you cant really test for that unless theres a game currently being played.
Click the circle in top right to choose team.
Click the circle in top right to choose team.
Last edited by jake2456 on September 6th, 2023, 5:33 am, edited 1 time in total.
-
- Posts: 19
- Joined: May 8th, 2015, 8:15 pm
- Location: Manasquan, NJ USA
Re: Mlb Live Scores
It certainly looks better than before.
I'll look at tomorrow when the games are on. One thing I noticed during the brief time it showed data (before midnight) is that it listed the city name for the Mets as 'Flushing' ( I know they are bad, but really
) I don't know if any of the other teams have the issue, I assume it's because New York has 2 teams.


-
- Posts: 75
- Joined: June 8th, 2015, 10:39 pm
Re: Mlb Live Scores

Also noticed i forgot that while changing things back after doing some trial and erroring i didnt put in the correct Substitute= for the innings.
In measurses.inc replace Substitute=0 in each inning measure with Substitute="":"0" otherwise Heres an updated one.
Let me know if you figure anything out.
You do not have the required permissions to view the files attached to this post.