It is currently April 18th, 2024, 11:24 am

Weather.com JSON not loading correctly

General topics related to Rainmeter.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com JSON not loading correctly

Post by jsmorley »

Yincognito wrote: May 27th, 2020, 12:06 pm Just tried your suggested method, and unfortunately, in my case, it didn't work (same results in jsmorley's JSON parsing skin, by the way):
Desktop User Agent.jpg
Will try again the way jsmorley suggested, not necessarily to fix things (because I know they'll come back sooner or later) but to make another save of the page the "old way", if possible.
Yeah, I don't think UserAgent in and of itself fixes the problem. Didn't for me anyway. The only thing that has consistent results for me is deleting any cookies IE sets for the site when the problem presents itself.
User avatar
Yincognito
Rainmeter Sage
Posts: 7120
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ Weather.com JSON not loading correctly

Post by Yincognito »

jsmorley wrote: May 27th, 2020, 12:07 pm Yeah, I don't think UserAgent in and of itself fixes the problem. Didn't for me anyway. The only thing that has consistent results for me is deleting any cookies IE sets for the site when the problem presents itself.
Indeed. As expected, tried according to your advice and it worked. Now I can eagerly wait for it to break again, so I can make an accurate comparison (as my previously saved samples were taken using different URL query parameters) between the two page sources - I wonder how much it will take for it to break again this time, LOL. In the meantime, back to carefully setting up what I would like to be an adaptive regex for various versions (since they're just 3, with one of them probably already obsolete) - let's see if it's 100% possible.

One other thing ... maybe one could investigate what cookies exactly are causing this, by using NirSoft's EdgeCookiesView. Not that would solve anything, because those cookies will come back sooner or later, but at least to help identify where the issue is coming from. I already downloaded the tool and will take a look, but it would help to have more eyes on this, maybe what one of us misses the other notices...

EDIT: Another tool that can help with sending a lot of different types of requests for a particular URL, beautifying the response, and visualising cookies (including session cookies, that NirSoft's EdgeCookiesView apparently doesn't show) is Postman. Unfortunately, when beautifying the source, it only dos it for the HTML part and not the Javascript part, which remains unindented - probably its only flaw, so far. Certainly easier to handle than analyzing packets using Wireshark network protocol analyzer in the search for a clue on this...
Last edited by Yincognito on May 27th, 2020, 3:01 pm, edited 1 time in total.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
ryanchuang
Posts: 30
Joined: September 13th, 2019, 4:23 am

Re: ⭐ Weather.com JSON not loading correctly

Post by ryanchuang »

I did the ccleaner method,however,it broke really quick after working for few minutes.
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Re: ⭐ Weather.com JSON not loading correctly

Post by pul53dr1v3r »

i just noticed new weather.com site design for the first time:

Image
(just in case: click "Open image (link) in new tab" to see the image in full size)

It could be the culprit for headache we're having with the weather skins.
User avatar
xenium
Posts: 865
Joined: January 4th, 2018, 9:52 pm

Re: ⭐ Weather.com JSON not loading correctly

Post by xenium »

pul53dr1v3r wrote: May 28th, 2020, 4:24 pm i just noticed new weather.com site design for the first time:
It could be the culprit for headache we're having with the weather skins.
Strange.
I don't have the new design..
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com JSON not loading correctly

Post by jsmorley »

Yeah, I like the new design, but it really doesn't have anything to do with the JSON.


1.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2602
Joined: March 23rd, 2015, 5:26 pm

Re: ⭐ Weather.com JSON not loading correctly

Post by SilverAzide »

xenium wrote: May 28th, 2020, 5:04 pm Strange.
I don't have the new design..
I don't have this new design either... UNLESS I change the user agent string to one for Android. If you set it to:
Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Mobile Safari/537.36
you'll get the new page.
Gadgets Wiki GitHub More Gadgets...
User avatar
balala
Rainmeter Sage
Posts: 16143
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
Rainmeter Sage
Posts: 7120
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.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
pul53dr1v3r
Posts: 442
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.