It is currently September 23rd, 2020, 10:01 am

⭐ Weather.com - Parsing the V3 JSON - NEW!

Our most popular Tips and Tricks from the Rainmeter Team and others
dvo
Posts: 970
Joined: February 7th, 2016, 6:08 am

Re: ⭐ weather.com - Parsing the JSON

Post by dvo »

it's back we got Celsius again... :D ( 2 may 10.00 ) and it went again later in time.... :Whistle
Last edited by dvo on May 22nd, 2020, 7:47 am, edited 1 time in total.
iron2000
Posts: 15
Joined: June 6th, 2011, 3:47 am

Re: ⭐ weather.com - Parsing the JSON

Post by iron2000 »

Not sure is it temporary or they changed something.
The embedded JSON seems to be gone and the RegEx is picking up nothing.

At least on my skin.
Was working fine for a few days (switched to the JSON code on the 19th), just broke a like an hour ago.
User avatar
jsmorley
Developer
Posts: 21386
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ weather.com - Parsing the JSON

Post by jsmorley »

iron2000 wrote: May 21st, 2020, 6:38 pm Not sure is it temporary or they changed something.
The embedded JSON seems to be gone and the RegEx is picking up nothing.

At least on my skin.
Was working fine for a few days (switched to the JSON code on the 19th), just broke a like an hour ago.
Try restarting Rainmeter. Nothing has changed.
User avatar
Yincognito
Posts: 2584
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ weather.com - Parsing the JSON

Post by Yincognito »

jsmorley wrote: May 21st, 2020, 6:55 pm Try restarting Rainmeter. Nothing has changed.
Actually, I've experienced the same thing, but I was busy with other things at the time and didn't notice. Now however...
Notice the absence of quotes enclosing the name of the fields / sections. Hopefully, this is all that has changed, but I'm not sure yet. (<-- my bad, this was due to the stupid "upgraded" HTML formatter - why the heck do they need to "upgrade" a perfectly working thing?)

My weather skin isn't picking anything either, although the source page seems to be relatively similar.
User avatar
jsmorley
Developer
Posts: 21386
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ weather.com - Parsing the JSON

Post by jsmorley »

Yincognito wrote: May 21st, 2020, 7:37 pm Actually, I've experienced the same thing, but I was busy with other things at the time and didn't notice. Now however...
Notice the absence of quotes enclosing the name of the fields / sections. Hopefully, this is all that has changed, but I'm not sure yet. (<-- my bad, this was due to the stupid "upgraded" HTML formatter - why the heck do they need to "upgrade" a perfectly working thing?)

My weather skin isn't picking anything either, although the source page seems to be relatively similar.
I can't even make any observation if someone is not using the exact, most recent, version of the JSON parsing include files that are included with the skin in the first post of this thread. I have no interest whatsoever in any issues with HTML parsers, or any skin that isn't using my JSON include files.

Any discussion of any other method of parsing the site is just entirely off topic, and should be in its own thread.

For me at least, it's working just fine right now, and has been all day. I can't provide any insight to anyone having an issue, perhaps on some "regional" basis for the site, since it just works as expected for me.
User avatar
Yincognito
Posts: 2584
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ weather.com - Parsing the JSON

Post by Yincognito »

jsmorley wrote: May 21st, 2020, 8:36 pm I can't even make any observation if someone is not using the exact, most recent, version of the JSON parsing include files that are included with the skin in the first post of this thread. I have no interest whatsoever in any issues with HTML parsers, or any skin that isn't using my JSON include files.

Any discussion of any other method of parsing the site is just entirely off topic, and should be in its own thread.

For me at least, it's working just fine right now, and has been all day. I can't provide any insight to anyone having an issue, perhaps on some "regional" basis for the site, since it just works as expected for me.
Fair enough. I can check it all by myself using automated file comparison, no worries.
User avatar
Yincognito
Posts: 2584
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ weather.com - Parsing the JSON

Post by Yincognito »

jsmorley wrote: May 21st, 2020, 8:36 pmI can't even make any observation if someone is not using the exact, most recent, version of the JSON parsing include files that are included with the skin in the first post of this thread. I have no interest whatsoever in any issues with HTML parsers, or any skin that isn't using my JSON include files.

Any discussion of any other method of parsing the site is just entirely off topic, and should be in its own thread.
So, this is the exact, most recent, version of the JSON parsing include files that are included with the skin in the first post of this thread, i.e. your JSON include files :sly: :
WeatherComJSON.jpg
jsmorley wrote: May 21st, 2020, 8:36 pmFor me at least, it's working just fine right now, and has been all day. I can't provide any insight to anyone having an issue, perhaps on some "regional" basis for the site, since it just works as expected for me.
Yep, so this must be a "regional" issue then. The "center" is fine, as always, it's them "outskirts" causing the troubles obviously. Nobody cares about the ghetto life, the thug life anymore... :-(

Joking aside, it could be a temporary issue, maybe waiting a couple of hours or till the next day might "magically" clear this issue. ;-)

Note: The "off topic" regexes seems to work fine in an online tester where I copy paste the original source page. The file comparison process didn't yield any real difference either and the WebParser parents (both the "on" and the "off" topic) don't get any data (even when setting RegExp=^(.*)$), so it might be a permission issue. Hopefully it's IP / regionally based and not Rainmeter based.
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 21386
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ weather.com - Parsing the JSON

Post by jsmorley »

You might try opening WeatherComJSONMeasures.inc and adding a UserAgent string to the master parent measure:

Code: Select all

[@EntireSiteSuperParent]
Measure=WebParser
URL=#URLSite#
UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0
DecodeCharacterReference=1
UpdateRate=#UpdateRate#
LogSubstringErrors=0
RegExp=(?siU)^(.*)$
StringIndex=1
FinishAction=[!EnableMeasureGroup Parents]
;Debug=2
;Debug2File=#@#EntireSite.txt
iron2000
Posts: 15
Joined: June 6th, 2011, 3:47 am

Re: ⭐ weather.com - Parsing the JSON

Post by iron2000 »

jsmorley wrote: May 21st, 2020, 11:13 pm You might try opening WeatherComJSONMeasures.inc and adding a UserAgent string to the master parent measure:

Code: Select all

[@EntireSiteSuperParent]
Measure=WebParser
URL=#URLSite#
UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0
DecodeCharacterReference=1
UpdateRate=#UpdateRate#
LogSubstringErrors=0
RegExp=(?siU)^(.*)$
StringIndex=1
FinishAction=[!EnableMeasureGroup Parents]
;Debug=2
;Debug2File=#@#EntireSite.txt
Adding UserAgent doesn't work.
User avatar
nbtc971
Posts: 13
Joined: May 22nd, 2020, 6:10 am

Re: ⭐ weather.com - Parsing the JSON

Post by nbtc971 »

Yeah, weather isn't loading for me either.