It is currently March 29th, 2024, 8:55 am

⭐ Converting Existing Weather Skins Tip

Tips and Tricks from the Rainmeter Community
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Converting Existing Weather Skins Tip

Post by jsmorley »

eclectic-tech wrote: January 21st, 2020, 12:07 am That is a better practice, as usual from you :great:

FinishActions removed here too :p
I'm about ready to post my new Weather.com skin. Looks like this now:


2.png
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Converting Existing Weather Skins Tip

Post by jsmorley »

eclectic-tech,

I renamed the @Include file WeatherEightDay.inc to WeatherForecast.inc and made the appropriate changes everywhere to harmonize that.

So all the "eight-day" stuff, @Include file, URL variable, and all measure names, use Forecast as the prefix to the name.

Helps that when you see @Forecast... as a measure name, you know where it came from.

https://forum.rainmeter.net/viewtopic.php?f=118&t=34470&p=170411#p170411
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: ⭐ Converting Existing Weather Skins Tip

Post by eclectic-tech »

Looks good! :thumbup:

Still have several more to convert, so those should definitely help. This will make updating old skins better by not having to worry about duplicate section names. Glad you caught that. 8-)

Here's hoping the webmaster at TWC doesn't get too ambitious with updates :p
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Converting Existing Weather Skins Tip

Post by jsmorley »

eclectic-tech wrote: January 21st, 2020, 3:17 am Here's hoping the webmaster at TWC doesn't get too ambitious with updates :p
Kill me now...

That's when I throw in the towel and convert to DarkSky and live with the hassle of users getting API keys and closing my eyes to the terms and conditions...

When DarkSky suddenly sees over a million new requests for "developer" API keys, who knows what their reaction will be...
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: ⭐ Converting Existing Weather Skins Tip

Post by SilverAzide »

Well, I'm just waiting for the IT weenies at weather.com to start blocking requests from the Rainmeter WebParser. If you recall, it wasn't too long ago that Bloomberg started checking user-agent strings to prevent scraping their site for stock market data.
Gadgets Wiki GitHub More Gadgets...
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Converting Existing Weather Skins Tip

Post by jsmorley »

SilverAzide wrote: January 21st, 2020, 5:32 pm Well, I'm just waiting for the IT weenies at weather.com to start blocking requests from the Rainmeter WebParser. If you recall, it wasn't too long ago that Bloomberg started checking user-agent strings to prevent scraping their site for stock market data.
That's easy. If we need to, we can just add

UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0

To all the "super parent" measures that go out to the site.

Although, if weather.com really wants to block "scraping", there are other, more certain, ways they can determine that it's really a browser hitting the site, or they can simply obfuscate the data from tools like WebParser with some javascript.

Some bridges are meant to be crossed when you get to them.