It is currently May 23rd, 2024, 8:45 am

⭐ Weather.com - Parsing the V3 JSON

Our most popular Tips and Tricks from the Rainmeter Team and others
tenchi0205
Posts: 1
Joined: June 11th, 2020, 7:23 am

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by tenchi0205 »

How to update the new weather api to the ASTROweather skin?
User avatar
xenium
Posts: 872
Joined: January 4th, 2018, 9:52 pm

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by xenium »

tenchi0205 wrote: June 11th, 2020, 7:25 am How to update the new weather api to the ASTROweather skin?
ASTRO Weather works.
Download the latest update
bhench
Posts: 5
Joined: June 11th, 2020, 3:15 am

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by bhench »

Yincognito wrote: June 11th, 2020, 5:33 am Well, I wrote about the same issue a couple of pages back, and you can see for yourself what the resolution was... :Whistle

Now having said that, what matters here is what is delivered by WebParser, not the browser. Unfortunately, I cannot replicate the issue, just tried jsmorley's skin again and it's returning the correct imperial units. I'm not sure if toggling the other options in the WebParser parent (i.e. ForceReload, UserAgent, etc.) would make a difference, as it didn't for me, the browser and WebParser results continuing being different in terms of units.

Maybe jsmorley can help with more on this - me, that's all I got.

P.S. And for freaking sake, it's Celsius, not Celcius, LOL.
Guess I was up too late to type correctly... CelSius. I tried using all different versions of location. I deleted everything and downloaded a fresh v3 with the default from jsmorely/ Fort Hood VA. Always comes back metric. I changed the UserAgent to only be "Mobile Safari/537.36" to try and force a different response. Nothing, everything metric. If there is a setting I am missing, please tell me. :handtohead: :headbang:

Image
User avatar
jsmorley
Developer
Posts: 22634
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by jsmorley »

bhench wrote: June 11th, 2020, 11:54 am Guess I was up too late to type correctly... CelSius. I tried using all different versions of location. I deleted everything and downloaded a fresh v3 with the default from jsmorely/ Fort Hood VA. Always comes back metric. I changed the UserAgent to only be "Mobile Safari/537.36" to try and force a different response. Nothing, everything metric. If there is a setting I am missing, please tell me. :handtohead: :headbang:

Image
Well, that's a new one... Can you .zip up the entire folder for your weather skin and attach it here? I'd like to see if there is something you have changed, maybe inadvertently, that is causing this.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2641
Joined: March 23rd, 2015, 5:26 pm

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by SilverAzide »

jsmorley wrote: June 11th, 2020, 12:00 pm Well, that's a new one... Can you .zip up the entire folder for your weather skin and attach it here? I'd like to see if there is something you have changed, maybe inadvertently, that is causing this.
I have not had time to try this, but if you go to the weather.com site, you can manually select the locale and units. It's sticky, so when you return to the site, it's still set, which I assume means it's something stored in a cookie. I wonder... if you pick "C" manually on the site, will the WebParser call return metric even for non-metric locales? It's obviously possible with the browser, but I didn't think WebParser read cookies. (Obviously you'd need use IE to replicate this.)
Image1.jpg
You do not have the required permissions to view the files attached to this post.
Gadgets Wiki GitHub More Gadgets...
User avatar
jsmorley
Developer
Posts: 22634
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by jsmorley »

SilverAzide wrote: June 11th, 2020, 12:15 pm I have not had time to try this, but if you go to the weather.com site, you can manually select the locale and units. It's sticky, so when you return to the site, it's still set, which I assume means it's something stored in a cookie. I wonder... if you pick "C" manually on the site, will the WebParser call return metric even for non-metric locales? It's obviously possible with the browser, but I didn't think WebParser read cookies. (Obviously you'd need use IE to replicate this.)

Image1.jpg
Yeah, it might be worth using "Internet Options" from the Start menu, and entirely clearing the cache and cookies for Internet Explorer.
bhench
Posts: 5
Joined: June 11th, 2020, 3:15 am

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by bhench »

jsmorley wrote: June 11th, 2020, 12:00 pm Well, that's a new one... Can you .zip up the entire folder for your weather skin and attach it here? I'd like to see if there is something you have changed, maybe inadvertently, that is causing this.
I used a cleanly downloaded and updated as of 6/7/2020 version of your JSON v3. I deleted all cookies and cache but it still it returns metric. Using the default URL and your webparse in RainRegExp it gives me units=m. I tried my location code (USMO1053), the lon/lat, and tried the long description for St. Louis Missouri. Same results. I tried using chrome and edge, clicking on C and back to F, same results. I tried us-ca, same results.

:confused:
2020-06-11_9-42-12.jpg
2020-06-11_9-51-08.jpg
2020-06-11_9-49-16.jpg
2020-06-11_9-48-23.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22634
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by jsmorley »

Well, when I download and run your version of Weather.com, directly from the .zip you provided, it works as expected.


1.jpg


This tells me that there simply must be something "stuck" in your cache or cookies for Internet Explorer. Not Edge, nothing to do with it. Not Chrome, nothing to do with it. Microsoft Internet Explorer.


I would first entirely Exit Rainmeter.

Then:


2.jpg

Do that one above at least 3 times, waiting a minute or so between each time.




Then delete any files that somehow survived that. None should have really...

3.jpg

Then wait a minute or two and restart Rainmeter.
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 7313
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by Yincognito »

jsmorley wrote: June 11th, 2020, 3:05 pmWell, when I download and run your version of Weather.com, directly from the .zip you provided, it works as expected.
For me as well. I didn't clear my cookies or anything, since the last time a week or so ago.
Bhench reported that he did clear the cookies beforehand, but I'm not sure he did all the steps you posted in the above reply though.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
bhench
Posts: 5
Joined: June 11th, 2020, 3:15 am

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by bhench »

jsmorley wrote: June 11th, 2020, 3:05 pm Well, when I download and run your version of Weather.com, directly from the .zip you provided, it works as expected.

This tells me that there simply must be something "stuck" in your cache or cookies for Internet Explorer. Not Edge, nothing to do with it. Not Chrome, nothing to do with it. Microsoft Internet Explorer.


I would first entirely Exit Rainmeter.

Then:

Do that one above at least 3 times, waiting a minute or so between each time.

Then delete any files that somehow survived that. None should have really...


Then wait a minute or two and restart Rainmeter.
Well Mr jsmorely.... I did all that and still got metric. :headbang: I rebooted, cleared it again and FINALLY... I have Imperial. :YESSS: I have no idea what was causing it and cannot thank you enough for helping me resolve it. :bow: