It is currently March 28th, 2024, 3:25 pm

Weather.com JSON not loading correctly

General topics related to Rainmeter.
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: ⭐ Weather.com JSON not loading correctly

Post by xenium »

SilverAzide wrote: May 28th, 2020, 5:07 pm 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.
Thank you very much SilverAzide
I used it to rewrite my Windows 10 Weather Enterprise skin to use JSON data from the new TWC website.
Anyway, my skins that use the HTML source from TWC work well for me
User avatar
Yincognito
Rainmeter Sage
Posts: 7024
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ Weather.com JSON not loading correctly

Post by Yincognito »

xenium wrote: June 4th, 2020, 11:01 am Thank you very much SilverAzide
I used it to rewrite my Windows 10 Weather Enterprise skin to use JSON data from the new TWC website.
Yep, that's probably the most convenient solution of them all (if weather.com consistently serves V3 to mobile clients, that is). Well done! :thumbup:
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather.com JSON not loading correctly

Post by jsmorley »

I will be updating my @Include files to support the "V3" JSON version from weather.com sometime tomorrow.
DrRoboculous
Posts: 8
Joined: June 7th, 2020, 7:18 pm

Re: Weather.com JSON not loading correctly

Post by DrRoboculous »

So what does this mean for users? Is there a code i'm supposed to copy & paste in all my skins? I've been trying to follow these threads for the last couple of weeks but, i'm not a coder or a skin-maker or anything; i'm just a Rainmeter user. I think I have a basic sort-of understanding of what the problem is but i don't understand what any of this means in terms of how to fix it. Any help? Thanks. Keep up the great work, everybody.

[By the way: you guys probably can't see the humor in the situation of a non-coder reading a message board and seeing a post that is just a wall of long lines of code followed by a response in human words, like "great work!" - but trust me, it's funny.]
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm
Contact:

Re: Weather.com JSON not loading correctly

Post by SilverAzide »

DrRoboculous wrote: June 7th, 2020, 7:32 pm So what does this mean for users? Is there a code i'm supposed to copy & paste in all my skins? I've been trying to follow these threads for the last couple of weeks but, i'm not a coder or a skin-maker or anything; i'm just a Rainmeter user. I think I have a basic sort-of understanding of what the problem is but i don't understand what any of this means in terms of how to fix it. Any help? Thanks. Keep up the great work, everybody.

[By the way: you guys probably can't see the humor in the situation of a non-coder reading a message board and seeing a post that is just a wall of long lines of code followed by a response in human words, like "great work!" - but trust me, it's funny.]
Well, this all depends on the weather skin you are using. Assuming it was working up until recently (i.e., based on weather.com), AND assuming it was using the "weather templates" found on these forums, AND assuming the skin author hasn't already fixed it for you, then you can do this:
  • Go to https://forum.rainmeter.net/viewtopic.php?f=118&t=34628
  • Install the skin
  • Go into the Weather.com\@Resources folder and copy the WeatherComJSONMeasures.inc file to your skin's @Resources folder, overwriting the one you have. (If your skin doesn't have this file, you are hosed.)
  • Refresh everything and pray.
User avatar
ScottyK
Posts: 2
Joined: June 8th, 2020, 12:13 am

Re: Weather.com JSON not loading correctly

Post by ScottyK »

DrRoboculous wrote: June 7th, 2020, 7:32 pm So what does this mean for users? Is there a code i'm supposed to copy & paste in all my skins? I've been trying to follow these threads for the last couple of weeks but, i'm not a coder or a skin-maker or anything; i'm just a Rainmeter user. I think I have a basic sort-of understanding of what the problem is but i don't understand what any of this means in terms of how to fix it. Any help? Thanks. Keep up the great work, everybody.

[By the way: you guys probably can't see the humor in the situation of a non-coder reading a message board and seeing a post that is just a wall of long lines of code followed by a response in human words, like "great work!" - but trust me, it's funny.]
I have to say that I also fall into the same camp as the good Doctor here. I am a complete novice when it comes to this. I did manage, however, to do some modification on the old HTC skin, and it was working fine up until all of this recent nonsense. Following these directions, I managed to get it working again, although my "degrees" symbol renders kinda funny:

HTC SPK.jpg
Any thoughts on why this might be and what I can do to correct it?

Also, I have to say a big THANK YOU!! for everyones hard work making this right again!
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather.com JSON not loading correctly

Post by jsmorley »

ScottyK wrote: June 8th, 2020, 12:31 am I have to say that I also fall into the same camp as the good Doctor here. I am a complete novice when it comes to this. I did manage, however, to do some modification on the old HTC skin, and it was working fine up until all of this recent nonsense. Following these directions, I managed to get it working again, although my "degrees" symbol renders kinda funny:


HTC SPK.jpg

Any thoughts on why this might be and what I can do to correct it?

Also, I have to say a big THANK YOU!! for everyones hard work making this right again!
You can fix the degree symbol by changing the encoding of the skin .ini to Unicode UTF-16 Little Endian, then save the skin, reload it, and THEN, paste in the ° degree symbol.

https://docs.rainmeter.net/tips/unicode-in-rainmeter/
User avatar
ScottyK
Posts: 2
Joined: June 8th, 2020, 12:13 am

Re: Weather.com JSON not loading correctly

Post by ScottyK »

Thank you so much, jsmorley; it worked like a charm!

Mind you, I needed to figure out how to change the encoding, but once I did, I got it to run.

:thumbup:
HTC SPK 2.jpg
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather.com JSON not loading correctly

Post by jsmorley »

ScottyK wrote: June 8th, 2020, 4:12 pm Thank you so much, jsmorley; it worked like a charm!

Mind you, I needed to figure out how to change the encoding, but once I did, I got it to run.

:thumbup:

HTC SPK 2.jpg
Excellent!
Post Reply