It is currently March 28th, 2024, 8:44 pm

⭐ Weather.com

Weather skins
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com

Post by jsmorley »

Yincognito wrote: May 28th, 2020, 12:43 pm Quick question, jsmorley: does Rainmeter's PCRE Regex support branch reset groups (i.e. in (?|(a)|(b)) both groups - a and b - would be counted as group \1), from what you're aware of? Cause if it does, that would be of tremendous help in designing an adaptive regex.
I really don't know. I think you will have to just test it.
User avatar
Yincognito
Rainmeter Sage
Posts: 7027
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ Weather.com

Post by Yincognito »

jsmorley wrote: May 28th, 2020, 12:44 pm I really don't know. I think you will have to just test it.
Yep, it appears it does - just tested. :thumbup:
For example, something like below should capture all the forecast data (which can be then split up in smaller pieces using StringIndex and StringIndex2 in WebParser), irrespective of what version (V2 or V3) is the structure of the page source:

Code: Select all

DailyForecast="(?siU).*(?|"DailyForecast":.*".*geocode:.*".*"data":.*{((?:[^}]*{){2}.*(?:}[^{]*){2})}.*|"getSunV3DailyForecastUrlConfig":.*".*15day;geocode:.*".*"data":.*{((?:[^}]*{){1}.*(?:}[^{]*){1})}.*|"v3-wx-forecast-daily-15day":.*{((?:[^}]*{){0}.*(?:}[^{]*){0})}.*)"
Another quick question, if you don't mind: does WebParser support parent nesting? In other words, can a WebParser child measure (which takes its data from an actual parent parsing the URL) be a parent for another WebParser child measure, so that one can use StringIndex and StringIndex2 options in both measures?
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: ⭐ Weather.com

Post by fonpaolo »

Hi all.
I came here to ask for something different, then I saw this, so I'm asking what's happening... O.O

When did this problem start?
Are you all using the same code?
I guess you're all using it from different countries, am I right?
How often do you "hit" the site, more or less than 30 minutes?

Now that I've finally fixed my skin, I wouldn't want to start over, even if nothing has happened to me yet. :x
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com

Post by jsmorley »

fonpaolo wrote: May 28th, 2020, 2:11 pm Hi all.
I came here to ask for something different, then I saw this, so I'm asking what's happening... O.O

When did this problem start?
Are you all using the same code?
I guess you're all using it from different countries, am I right?
How often do you "hit" the site, more or less than 30 minutes?

Now that I've finally fixed my skin, I wouldn't want to start over, even if nothing has happened to me yet. :x
The problem started about a week ago more or less. I would expect, or at least hope, that everyone replying in this particular thread is using the same @Include files distributed in the .rmskin in the first post. However, it seems like anyone who is parsing the weather.com JSON code in any way is having the same intermittent problems. It doesn't seem to at all be related to where in the world you are, or where in the world your location code points to. I hit the site every 10 minutes, but I don't see that as a factor.

I'm not thrilled about the thought of re-parsing all this again, it's a fair amount of work. However, if the site ever settles down to one approach, where I can be relatively certain what format any given user is going to get, I'll certainly do it.

In the meantime, I think all we can do is wait to see where this is heading.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: ⭐ Weather.com

Post by fonpaolo »

Well, I'm asking, just because I don't use your method, and I'm doubtful if maybe I'm just lucky...

Anyway, can you please try this as RegExp code, instead of the usual "(?siU)^(.*)$", and see if it works for you?

Code: Select all

(?siU)^.*,"CmsStates":{"env:prod:locale:global":{.*,"data":{.*},"ttl":.*,"date":.*}},(.*)}},"ContentMediaQuery":{.*$
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com

Post by jsmorley »

fonpaolo wrote: May 28th, 2020, 2:43 pm Well, I'm asking, just because I don't use your method, and I'm doubtful if maybe I'm just lucky...

Anyway, can you please try this as RegExp code, instead of the usual "(?siU)^(.*)$", and see if it works for you?

Code: Select all

(?siU)^.*,"CmsStates":{"env:prod:locale:global":{.*,"data":{.*},"ttl":.*,"date":.*}},(.*)}},"ContentMediaQuery":{.*$
This is just not the right thread for this.

To be honest, I'm just not willing to put any time into this at all, until things settle down and we see where weather.com is going to end up on this.
User avatar
Yincognito
Rainmeter Sage
Posts: 7027
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ Weather.com

Post by Yincognito »

fonpaolo wrote: May 28th, 2020, 2:43 pm Well, I'm asking, just because I don't use your method, and I'm doubtful if maybe I'm just lucky...

Anyway, can you please try this as RegExp code, instead of the usual "(?siU)^(.*)$", and see if it works for you?

Code: Select all

(?siU)^.*,"CmsStates":{"env:prod:locale:global":{.*,"data":{.*},"ttl":.*,"date":.*}},(.*)}},"ContentMediaQuery":{.*$
I have saves of each of the page source formats (and more, LOL), and the CmsStates string is not found in the "new" format.
EDIT: It is called getCMSLinkListUrlConfig in the "new" (but still shaky) format.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: ⭐ Weather.com

Post by fonpaolo »

Yincognito wrote: May 28th, 2020, 2:49 pm I have saves of each of the page source formats (and more, LOL), and the CmsStates string is not found in the "new" format.
EDIT: It is called getCMSLinkListUrlConfig in the "new" (but still shaky) format.
I don't know what to say... probably my skin is working just for some kind of magic... :confused:

I'm using https://weather.com/#LangLoc#/weather/today/l/#LocationCode#, with my old eight digits location code.
The only difference is that I don't want to download all the clutter from the site.
User avatar
Yincognito
Rainmeter Sage
Posts: 7027
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ Weather.com

Post by Yincognito »

fonpaolo wrote: May 28th, 2020, 2:53 pm I don't know what to say... probably my skin is working just for some kind of magic... :confused:
Yeah, like jsmorley already said, the issue doesn't happen for everybody (yet). It's quite erratic at the moment, which is why we still don't know if we should begin parsing the new way or not, something jsmorley also alluded to. Personally, I was late the first time (the wxdata deprecation, at the start of the year), I'm starting early this time. My reasoning is that it can't hurt, since I do things to work for whatever format is thrown at WebParser.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: ⭐ Weather.com

Post by fonpaolo »

I tried now with both en-GB and en-US and it downloads just fine.
Can you point me to any location where there are problems to download?

I don't even think about uploading a skin for a fix that only works for a couple of days!