It is currently May 22nd, 2024, 8:49 pm

⭐ Weather.com - Parsing the V3 JSON

Our most popular Tips and Tricks from the Rainmeter Team and others
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, 4:02 pm 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:
The cookies in IE are a funny duck. In past years, they were stored as a physical file in that INetCache folder. They are not anymore. A physical file is actually put there, but it's just a placeholder for backwards compatibility. The actual cookie is stored in a database, that is shared with Edge. The Internet Options functionality that deletes the cache and cookies seems to delete the IE cookies from that database, as well as deleting the physical "cache" files, but it seems to take a couple of minutes to actually clear out and get that database working right. In the meantime, it can still "see" the cookie if you go back to the site.

We are getting ready to roll out a change to WebParser that I'm hoping is going to solve this.

We are adding a new option for a WebParser "parent" measure, called Flags. I won't go into that fully here, but one of the flags you can set is NoCookies, which will not allow any site to set a cookie in WebParser. Any command to set a cookie is just ignored. Time will tell, but I'm thinking that this is going to help with issues like this one.

This change will be out soon, maybe later today.
User avatar
Yincognito
Rainmeter Sage
Posts: 7312
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, 5:35 pm The cookies in IE are a funny duck. In past years, they were stored as a physical file in that INetCache folder. They are not anymore. A physical file is actually put there, but it's just a placeholder for backwards compatibility. The actual cookie is stored in a database, that is shared with Edge. The Internet Options functionality that deletes the cache and cookies seems to delete the IE cookies from that database, as well as deleting the physical "cache" files, but it seems to take a couple of minutes to actually clear out and get that database working right. In the meantime, it can still "see" the cookie if you go back to the site.

We are getting ready to roll out a change to WebParser that I'm hoping is going to solve this.

We are adding a new option for a WebParser "parent" measure, called Flags. I won't go into that fully here, but one of the flags you can set is NoCookies, which will not allow any site to set a cookie in WebParser. Any command to set a cookie is just ignored. Time will tell, but I'm thinking that this is going to help with issues like this one.

This change will be out soon, maybe later today.
That's a new one - well done! As long as it doesn't affect the other browser / application cookie operations and firmly sticks only with the specific WebParser parent measure it's set on, I believe it's going to be useful indeed. :thumbup:

Never imagined a weather.com issue was going to set a WebParser update / upgrade in motion, not in a million years... :???:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
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 »

Yincognito wrote: June 11th, 2020, 6:16 pm That's a new one - well done! As long as it doesn't affect the other browser / application cookie operations and firmly sticks only with the specific WebParser parent measure it's set on, I believe it's going to be useful indeed. :thumbup:

Never imagined a weather.com issue was going to set a WebParser update / upgrade in motion, not in a million years... :???:
Yes, it will be specific to the parent WebParser measure it is on.
User avatar
Yincognito
Rainmeter Sage
Posts: 7312
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, 6:39 pm Yes, it will be specific to the parent WebParser measure it is on.
Nice! ;-)
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, 5:35 pm The cookies in IE are a funny duck. In past years, they were stored as a physical file in that INetCache folder. They are not anymore. A physical file is actually put there, but it's just a placeholder for backwards compatibility. The actual cookie is stored in a database, that is shared with Edge. The Internet Options functionality that deletes the cache and cookies seems to delete the IE cookies from that database, as well as deleting the physical "cache" files, but it seems to take a couple of minutes to actually clear out and get that database working right. In the meantime, it can still "see" the cookie if you go back to the site.

We are getting ready to roll out a change to WebParser that I'm hoping is going to solve this.

We are adding a new option for a WebParser "parent" measure, called Flags. I won't go into that fully here, but one of the flags you can set is NoCookies, which will not allow any site to set a cookie in WebParser. Any command to set a cookie is just ignored. Time will tell, but I'm thinking that this is going to help with issues like this one.

This change will be out soon, maybe later today.
Ummm... I work for Cisco, you are going to possibly have that out later today O.O !! You want to come work for us :lol: I wish we had that good of customer service.
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 »

Ok, the beta is out with the new "Flags" option....
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 »

So my advice is to change your WebParser parent, something like this:

Code: Select all

[@EntireSiteSuperParent]
Measure=WebParser
URL=#URLSite#
DecodeCharacterReference=1
Flags=NoCookies | ForceReload
UpdateRate=#UpdateRate#
UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0
LogSubstringErrors=0
RegExp=(?siU)^(.*)$
StringIndex=1
FinishAction=[!EnableMeasureGroup Parents]
;Debug=2
;Debug2File=#@#EntireSite.txt
I will be making that change to all my skins and updating them shortly.
User avatar
Yincognito
Rainmeter Sage
Posts: 7312
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, 7:56 pm Ok, the beta is out with the new "Flags" option....
... and the manual is updated as well, what a treat. 8-)
jsmorley wrote: June 11th, 2020, 7:58 pm So my advice is to change your WebParser parent...
I am really curious if this will consistently / permanently solve those related weather.com issues. Time will tell, I guess. :sly:

In any case, very nice addition. :great: :rosegift:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Re: ⭐ Weather.com - Parsing the V3 JSON

Post by pul53dr1v3r »

jsmorley wrote: June 11th, 2020, 5:35 pm We are getting ready to roll out a change to WebParser that I'm hoping is going to solve this.

We are adding a new option for a WebParser "parent" measure, called Flags. I won't go into that fully here, but one of the flags you can set is NoCookies, which will not allow any site to set a cookie in WebParser. Any command to set a cookie is just ignored. Time will tell, but I'm thinking that this is going to help with issues like this one.
Thanks for this! Hope it will be really helpful, even though i can't reproduce the cookie issue since the new JSON started to work in order to put it to the test. :rosegift:
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 »

pul53dr1v3r wrote: June 11th, 2020, 8:41 pm Thanks for this! Hope it will be really helpful, even though i can't reproduce the cookie issue since the new JSON started to work in order to put it to the test. :rosegift:
Hard to prove a negative, but I guess the test will be if we continue to get these weird reports here on the forums once folks have the new beta.