It is currently April 27th, 2024, 12:17 am

Weather Advisory from Weather.com solved

Get help with creating, editing & fixing problems with skins
User avatar
CyberTheWorm
Posts: 860
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Weather Advisory from Weather.com solved

Post by CyberTheWorm »

Anyone know how to retrieve the weather advisory from weather.com?
Capture.PNG
Windows 10 and openWeather skin show smoke but the weather.com does not.
You do not have the required permissions to view the files attached to this post.
Last edited by CyberTheWorm on August 4th, 2017, 7:56 am, edited 1 time in total.
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
User avatar
SilverAzide
Rainmeter Sage
Posts: 2611
Joined: March 23rd, 2015, 5:26 pm

Re: Weather Advisory from Weather.com

Post by SilverAzide »

The XML from weather.com will have a <swa>...</swa> section, but only if there is a severe weather alert. The trick is that the section will be missing completely if there is no alert, which makes trapping it cleanly with a regex kind of complicated.

If you want some examples, my skin HERE grabs the first alert, and if you want a skin that can grab all the alerts cleanly (however many there are), you'll need to do what Mr. Morley did HERE.
Gadgets Wiki GitHub More Gadgets...
User avatar
CyberTheWorm
Posts: 860
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: Weather Advisory from Weather.com

Post by CyberTheWorm »

SilverAzide wrote:The XML from weather.com will have a <swa>...</swa> section, but only if there is a severe weather alert. The trick is that the section will be missing completely if there is no alert, which makes trapping it cleanly with a regex kind of complicated.

If you want some examples, my skin HERE grabs the first alert, and if you want a skin that can grab all the alerts cleanly (however many there are), you'll need to do what Mr. Morley did HERE.
OK that makes sense the feed is not showing any severe weather alert.
The only source of knowledge is experience. Albert Einstein
Deviant Art Page