Thank you very much. I was comparing the code from the old and new versions and see that the changes were quite significant... completely different website, even. You make these skins look almost easy. I hope you know that your work is very much appreciated, including all the teaching you do in the forums here.
Kevin Fonda
It is currently September 1st, 2024, 2:23 am
MLB Standings
-
- Posts: 20
- Joined: May 8th, 2015, 8:15 pm
- Location: Manasquan, NJ USA
-
- Developer
- Posts: 22710
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: MLB Standings
Yeah, the CBSSports site I was using has just made it stupidly hard to parse with a recent change, so I switched to NBCSports, which has a relatively simply site.kfonda wrote:Thank you very much. I was comparing the code from the old and new versions and see that the changes were quite significant... completely different website, even. You make these skins look almost easy. I hope you know that your work is very much appreciated, including all the teaching you do in the forums here.
Kevin Fonda
That MLBStandings skin is one I fire up myself at least once a day to check things out. I'm a Washington Nationals fan, so while I have VERY little sympathy for you,
![Grinning :-)](./images/smilies/ab2.gif)
-
- Posts: 20
- Joined: May 8th, 2015, 8:15 pm
- Location: Manasquan, NJ USA
Re: MLB Standings
Just you wait 'til next year
( I've been saying that for most of the last 50 years).
BTW, was the CBS issue something to do with the little check box at the top and all the nearly impossible to sort out results? I did try to actually fix it myself, but I couldn't get the webparsed results to show anything like what you were looking for in the original version.
![Angry :17angry](./images/smilies/17angry.gif)
BTW, was the CBS issue something to do with the little check box at the top and all the nearly impossible to sort out results? I did try to actually fix it myself, but I couldn't get the webparsed results to show anything like what you were looking for in the original version.
-
- Developer
- Posts: 22710
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: MLB Standings
I didn't dig in very deep, as it was apparent at first glance that they had made it much more difficult to uniquely identify the different bits of information, so I quickly started looking for an easier alternative. Doesn't matter all that much where you get it from, the information is all the same. Mostly just want a site that updates as soon as possible after games are over.kfonda wrote:Just you wait 'til next year( I've been saying that for most of the last 50 years).
BTW, was the CBS issue something to do with the little check box at the top and all the nearly impossible to sort out results? I did try to actually fix it myself, but I couldn't get the webparsed results to show anything like what you were looking for in the original version.
-
- Posts: 5
- Joined: June 10th, 2020, 2:33 am
Re: MLB Standings
Any chance for updates in the year 2023? This has been a great program.
RMBill
RMBill
-
- Rainmeter Sage
- Posts: 8003
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: MLB Standings
First is this, in the [Variables] section of MLBStandings.ini:
Code: Select all
League=NL
Division=East
Team=.*<span class="td-teamAbbr">(.*)<\/span>.*<span class="td-teamLocation">(.*)<\/span>.*<span class="td-teamName">(.*)<\/span>.*
Entry=.*<tr>.*<td .*>#Team#<\/td>.*<td .*>(.*)<\/td>.*<td .*>(.*)<\/td>.*<td .*>(.*)<\/td>.*<td .*>(.*)<\/td>.*<td .*>(.*)<\/td>.*<td .*>(.*)<\/td>.*<td .*>(.*)<\/td>.*<td .*>(.*)<\/td>.*<td .*>(.*)<\/td>.*<td .*>(.*)<\/td>.*<td .*>(.*)<\/td>.*<\/tr>.*
Code: Select all
URL=https://www.nbcsports.com/mlb/standings
RegExp=(?siU)<bsp-tabs .*>.*<div class="TableGroup-title">#League#<\/div>.*<div class="Table-title">#Division#<\/div>.*<table .*>.*<tbody>#Entry##Entry##Entry##Entry##Entry#<\/tbody>.*<\/table>.*<\/bsp-tabs>
Next, is adjusting the other measures / meters to the new reality (e.g. more captures for a table line / team i.e. the 3 from the Team variable and the 11 from the Entry variable compared to the earlier 8, some new substitutes here and there, some slight measure referencing changes in some meters) - this is only for the first line / team, you do the rest by looking at what was changed:
Code: Select all
[MeasureInitials1]
Measure=WebParser
URL=[MeasureSite]
StringIndex=1
RegExpSubstitute=1
Substitute=" ":""
[MeasureTeamLocation1]
Measure=WebParser
URL=[MeasureSite]
StringIndex=2
RegExpSubstitute=1
Substitute=" ":""
[MeasureTeam1]
Measure=WebParser
URL=[MeasureSite]
StringIndex=3
RegExpSubstitute=1
Substitute=" ":""
[MeasureWon1]
Measure=WebParser
URL=[MeasureSite]
StringIndex=4
RegExpSubstitute=1
Substitute="(?:^\s+|\s+$)":""
[MeasureLost1]
Measure=WebParser
URL=[MeasureSite]
StringIndex=5
RegExpSubstitute=1
Substitute="(?:^\s+|\s+$)":""
[MeasurePercentage1]
Measure=WebParser
URL=[MeasureSite]
StringIndex=6
RegExpSubstitute=1
Substitute="(?:^\s+|\s+$)":""
[MeasureGamesBack1]
Measure=WebParser
URL=[MeasureSite]
StringIndex=7
RegExpSubstitute=1
Substitute="(?:^\s+|\s+$)":"","-":"---","½":".5"
[MeasureLastTen1]
Measure=WebParser
URL=[MeasureSite]
StringIndex=13
RegExpSubstitute=1
Substitute="(?:^\s+|\s+$)":""
[MeasureStreak1]
Measure=WebParser
URL=[MeasureSite]
StringIndex=14
RegExpSubstitute=1
Substitute="(?:^\s+|\s+$)":""
Code: Select all
[MeterName1]
Meter=String
X=75
Y=18r
FontSize=13
FontColor=#TeamColor#
SolidColor=0,0,0,1
StringStyle=Bold
AntiAlias=1
StringCase=Proper
Text=[MeasureTeamLocation1] [MeasureTeam1]
DynamicVariables=1
As for the rest, there is some Lua scripting when it comes to the "logos", to show them as that nice font based on their initials, but I'll skip that - the approach might be outdated by now, maybe jsmorley knows better.
-
- Posts: 5
- Joined: June 10th, 2020, 2:33 am
Re: MLB Standings
Great. Thank you. Just need to fine tune it.
RMBill
RMBill
-
- Rainmeter Sage
- Posts: 8003
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
-
- Posts: 20
- Joined: May 8th, 2015, 8:15 pm
- Location: Manasquan, NJ USA
-
- Rainmeter Sage
- Posts: 8003
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: MLB Standings
Small correction: it's already "working", just not complete. I intentionally left a few copy pasting and small adjustments that any of you folks can make... if you really like to have those standings on your screens and don't consider copy pasting difficult, that is.
![Wink ;-)](./images/smilies/innuendo.gif)