It is currently November 27th, 2020, 8:14 am

Weather.com JSON not loading correctly

General topics related to Rainmeter.
User avatar
balala
Rainmeter Sage
Posts: 11816
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ⭐ Weather.com JSON not loading correctly

Post by balala »

xenium wrote: May 28th, 2020, 5:04 pm I don't have the new design..
Not me either.
User avatar
Yincognito
Posts: 2933
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ Weather.com JSON not loading correctly

Post by Yincognito »

Remember when someone said some time ago (sorry, I forgot who he was) that the C (Celsius) / F (Fahrenheit) were not appearing anymore near the degree symbol? That's where it all started... :sly:

So I disagree, I think all these changes are related. We'll see if it's so anyway, eventually.
In other "news", I just made the regex work for either version (Location and Observation up until now, the Forecast part is harder because of different grouping, but hopefully not that hard).
Last edited by Yincognito on May 28th, 2020, 5:23 pm, edited 2 times in total.
dvo
Posts: 1038
Joined: February 7th, 2016, 6:08 am

Re: ⭐ Weather.com JSON not loading correctly

Post by dvo »

that was me :P
User avatar
pul53dr1v3r
Posts: 406
Joined: July 30th, 2014, 10:30 am

Re: ⭐ Weather.com JSON not loading correctly

Post by pul53dr1v3r »

jsmorley wrote: May 28th, 2020, 5:06 pm Yeah, I like the new design, but it really doesn't have anything to do with the JSON.
..nothing with JSON but obviously has sth to do with the things that happen in cookies as they (weather.com) change a lot of the things until they finish it. i guess so.

Will see if it stops after they finish applying the design to all...
Last edited by pul53dr1v3r on May 28th, 2020, 6:06 pm, edited 1 time in total.
User avatar
Yincognito
Posts: 2933
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ Weather.com JSON not loading correctly

Post by Yincognito »

dvo wrote: May 28th, 2020, 5:20 pmthat was me :P
Yes, you were. You are the culprit! :twisted:
User avatar
SilverAzide
Posts: 1004
Joined: March 23rd, 2015, 5:26 pm

Re: ⭐ Weather.com JSON not loading correctly

Post by SilverAzide »

jsmorley wrote: May 28th, 2020, 5:06 pm Yeah, I like the new design, but it really doesn't have anything to do with the JSON.
Has anyone who is having the JSON parsing issues tried "downgrading" the UserAgent string to IE7? I'm not having the problem, so I'm unable to test if the JSON changes.

IE7
UserAgent="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)"

IE11
UserAgent="Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
Gadgets Wiki GitHub More Gadgets...
dvo
Posts: 1038
Joined: February 7th, 2016, 6:08 am

Re: ⭐ Weather.com JSON not loading correctly

Post by dvo »

nope not yet i use :

UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0
User avatar
SilverAzide
Posts: 1004
Joined: March 23rd, 2015, 5:26 pm

Re: ⭐ Weather.com JSON not loading correctly

Post by SilverAzide »

Setting the user agent to one for Android definitely causes the "new" site to load, with different HTML and JSON. I'm wondering if dumbing down the browser/WebParser will cause weather.com to return the "old" site.
Gadgets Wiki GitHub More Gadgets...
User avatar
Yincognito
Posts: 2933
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ Weather.com JSON not loading correctly

Post by Yincognito »

SilverAzide wrote: May 28th, 2020, 5:24 pm Has anyone who is having the JSON parsing issues tried "downgrading" the UserAgent string to IE7? I'm not having the problem, so I'm unable to test if the JSON changes.

IE7
UserAgent="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)"

IE11
UserAgent="Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"
I'm not able to test it either, since I recently "fixed" the issue as per jsmorley's advice (and now I'm working locally anyway, until the regexes are finished). One other thing, regarding what you said about the measurement units, because I forgot to say it when replying to you earlier: it's not a big problem, since the "new format" only has 3 measurement unit systems: e=imperial, m=metric and h=hybrid (i.e. UK), and those strings (aka e,m,h) are all over the JSON and they can be extracted.
SilverAzide wrote: May 28th, 2020, 5:39 pm Setting the user agent to one for Android definitely causes the "new" site to load, with different HTML and JSON. I'm wondering if dumbing down the browser/WebParser will cause weather.com to return the "old" site.
They might just unify the platforms to match the mobile one, as suspected earlier, because I don't think they suddenly can't detect whether the system is a desktop or a mobile... Bottom line, now it's the "Win 8 period" on weather.com (i.e. little bugs, things being inconsistent, etc). I wonder how long will it take them to get to the "stable" "Win10 period" ... :D
User avatar
SilverAzide
Posts: 1004
Joined: March 23rd, 2015, 5:26 pm

Re: ⭐ Weather.com JSON not loading correctly

Post by SilverAzide »

Yincognito wrote: May 28th, 2020, 5:45 pmOne other thing, regarding what you said about the measurement units, because I forgot to say it when replying to you earlier: it's not a big problem, since the "new format" only has 3 measurement unit systems: e=imperial, m=metric and h=hybrid (i.e. UK), and those strings (aka e,m,h) are all over the JSON and they can be extracted.
Oh, I was not referring to that part, I was referring to the actual units of measure ("F", "C", "in", "mm", "mph", "kph", etc.). But you're right, it's not too big of a deal. More of an annoyance... :)
Gadgets Wiki GitHub More Gadgets...