It is currently March 28th, 2024, 8:54 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 »

No doubt about it, weather.com is acting really weird right now.

I have found that after clearing the IE cache, it pays to wait about one minute before restarting Rainmeter.
User avatar
Nickson
Posts: 13
Joined: May 10th, 2020, 7:02 pm

Re: ⭐ Weather.com

Post by Nickson »

Do you have the new page layout?
asdf.png
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com

Post by jsmorley »

Nickson wrote: May 26th, 2020, 11:06 pm Do you have the new page layout?

asdf.png
Yes, but that is just the HTML. That is going to change all the time. I don't use the HTML from the site. I use the embedded JSON code, which at least for me, is normally very consistent. There is something very weird going on right now with the site and the way IE is storing cached data and / or cookies, and that is causing some grief, but as far as I can tell, the structure of the JSON is still consistent.

I don't want to jump to conclusions or panic. I really want to very carefully test and try different things to see if I can figure out EXACTLY what is going on and what isn't, and what the exact steps are that can prevent or fix it when it happens.
User avatar
Nickson
Posts: 13
Joined: May 10th, 2020, 7:02 pm

Re: ⭐ Weather.com

Post by Nickson »

For me the JSON data structure is completely different from before...
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com

Post by jsmorley »

Nickson wrote: May 26th, 2020, 11:22 pm For me the JSON data structure is completely different from before...
That is indicative of the "cache / cookie" problem that we have been chasing for several days now. I suspect you will find that if you take the exact steps I have outlined in:

https://forum.rainmeter.net/viewtopic.php?f=118&t=35342&p=177064#p177064

You will find that all is once again well. At least for a while. We are still chewing on this...
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: ⭐ Weather.com

Post by SilverAzide »

jsmorley wrote: May 26th, 2020, 11:09 pm I don't want to jump to conclusions or panic. I really want to very carefully test and try different things to see if I can figure out EXACTLY what is going on and what isn't, and what the exact steps are that can prevent or fix it when it happens.
I'm not getting this error now that I've gotten the fix to work, but I expect it will return. I'm wondering if -- on machine that is having the problem -- a call to the weather.com URL using cURL instead of WebParser would return the same thing. And I wonder if the PowerShell "curl" would give different results than the "real cURL" (at curl.haxx.se). I guess where I'm going with this line of thought is if WebParser might need to change from using Win32/IE to using libcurl or the .NET Framework.
Gadgets Wiki GitHub More Gadgets...
User avatar
Jeff
Posts: 326
Joined: September 3rd, 2018, 11:18 am

Re: ⭐ Weather.com

Post by Jeff »

Image
I asked my brother to give me the page source on his side and his data is completely different form mine, I think the most obvious bit is there being 70 results for "Temperature" compared to 100 results from the previous layout.
Left is my brother's page source, right is my page source.
If this will change for everyone, good luck parsing arrays :D
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com

Post by jsmorley »

SilverAzide wrote: May 26th, 2020, 11:35 pm I'm not getting this error now that I've gotten the fix to work, but I expect it will return. I'm wondering if -- on machine that is having the problem -- a call to the weather.com URL using cURL instead of WebParser would return the same thing. And I wonder if the PowerShell "curl" would give different results than the "real cURL" (at curl.haxx.se). I guess where I'm going with this line of thought is if WebParser might need to change from using Win32/IE to using libcurl or the .NET Framework.
Yeah, could be. Some alternative might be a good idea.

The behavior here is really puzzling. The only conclusion I can draw at this point is that for some reason at some point weather.com returns JSON data that is formatted entirely differently. The API's then write this to the IE cache, and WebParser is not able to shake that on it's own. It may be that weather.com is "testing out" some new format, and we are getting tastes of it from time to time. I just don't know yet.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: ⭐ Weather.com

Post by SilverAzide »

jsmorley wrote: May 26th, 2020, 11:40 pm Yeah, could be. Some alternative might be a good idea.
Huh... here's something scary. Try running PowerShell and do this:

Code: Select all

curl -Uri "https://weather.com/en-US/weather/today/l/<your location code>" -Method Get -OutFile "c:\temp\test.txt"
What you get is the BAD data (the one that breaks the skin). And this is on a machine is currently WORKING (i.e., not having an issue). So in other words, I'm getting two different results from the same URI.
Gadgets Wiki GitHub More Gadgets...
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com

Post by jsmorley »

SilverAzide wrote: May 26th, 2020, 11:48 pm Huh... here's something scary. Try running PowerShell and do this:

Code: Select all

curl -Uri "https://weather.com/en-US/weather/today/l/<your location code>" -Method Get -OutFile "c:\temp\test.txt"
What you get is the BAD data (the one that breaks the skin). And this is on a machine is currently WORKING (i.e., not having an issue). So in other words, I'm getting two different results from the same URI.
Yeah, I have a bad feeling that this is going to get more weird before it settles down.