It is currently August 5th, 2020, 1:27 pm

⭐ Weather.com

Post your work-in-progress and completed skins to share and discuss.
User avatar
Jeff
Posts: 143
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: 21212
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
Posts: 924
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 DeviantArt More...
User avatar
jsmorley
Developer
Posts: 21212
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.
User avatar
Yincognito
Posts: 2143
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ Weather.com

Post by Yincognito »

Actually, right now weather.com is not providing the wrong JSON data, but the right one. This is how the JSON is formatted if accessing the site with an API key... :sly:

P.S. I'm obviously talking about the format that is visible on Jeff's screenshot. Not sure about the field names though, but the structure is similar. This is something I noticed ever since the problem occured the first time.
gerryex
Posts: 37
Joined: January 14th, 2018, 8:12 pm

Re: ⭐ Weather.com

Post by gerryex »

jsmorley wrote:
May 26th, 2020, 11:34 pm
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...
I know you guys are hot on the trail of this problem and I (and I'm sure others) are greatly appreciative of it.

But just wanted to let you know that I followed the steps above exactly (stop Rainmeter, clear temp files, wait 1 minute - I actually waited 4 minutes, then restart Rainmeter) and skins based on Weather.com still do not work!! Just wanted to give you another piece of information.

Gerry
User avatar
Yincognito
Posts: 2143
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ Weather.com

Post by Yincognito »

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.
Is that "bad data" the same as when using Debug=2 option on the WebParser measure, like mentioned here, or is it different? Just curious.
User avatar
SilverAzide
Posts: 924
Joined: March 23rd, 2015, 5:26 pm

Re: ⭐ Weather.com

Post by SilverAzide »

Yincognito wrote:
May 27th, 2020, 12:13 am
Is that "bad data" the same as when using Debug=2 option on the WebParser measure, like mentioned here, or is it different? Just curious.
NORMALLY it is exactly the same. At this current moment, I'm getting two different results. Curl is producing the "bad" format, WebParser is producing the "good" format. They should match identically in a normal world. Unfortunately (kind of), all my PCs are working properly now, so I can't test the output on a "broken" machine.
Gadgets DeviantArt More...
User avatar
SilverAzide
Posts: 924
Joined: March 23rd, 2015, 5:26 pm

Re: ⭐ Weather.com

Post by SilverAzide »

Yincognito wrote:
May 27th, 2020, 12:03 am
Actually, right now weather.com is not providing the wrong JSON data, but the right one. This is how the JSON is formatted if accessing the site with an API key...
This "other" style of JSON data seems fine, but it's missing the chunk with the units of measure, which is super-annoying. Everything else is there, and might be even easier to parse since everything is in uniform arrays.
Gadgets DeviantArt More...
User avatar
jsmorley
Developer
Posts: 21212
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com

Post by jsmorley »

SilverAzide wrote:
May 27th, 2020, 12:29 am
This "other" style of JSON data seems fine, but it's missing the chunk with the units of measure, which is super-annoying. Everything else is there, and might be even easier to parse since everything is in uniform arrays.
I wouldn't for one second "trust" any of the different / new formatted stuff. Not yet anyway. if this ever settles down to consistently be one way or the other, we will be able to see whats what.