It is currently November 30th, 2020, 11:24 pm

⭐ Weather.com

Post your work-in-progress and completed skins to share and discuss.
User avatar
Yincognito
Posts: 2933
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ Weather.com

Post by Yincognito »

jsmorley wrote: June 17th, 2020, 6:50 pmIt's one of the reasons I use a UserAgent string in my @Include file.
Yes. It's a good idea, and I thought about it as well - will apply it in my case ASAP as well. By the way, which user agent do you think it's the "safest" from the point of view of preferably getting the same data as without it?

P.S. I'm not necessarily talking about getting the same data as in the browser, I jut want to get the same data as without any user agent at all (i.e. just like Rainmeter's WebParser Plugin would do).
User avatar
jsmorley
Developer
Posts: 21561
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com

Post by jsmorley »

Yincognito wrote: June 17th, 2020, 6:56 pm Yes. It's a good idea, and I thought about it as well - will apply it in my case ASAP as well. By the way, which user agent do you think it's the "safest" from the point of view of preferably getting the same data as without it?
WebParser DOES use a User Agent string, it is "Rainmeter WebParser Plugin".

Well, I just go to one of the many "What is my User Agent" websites and use the same as my Firefox browser uses. That is part of the point for me. As for trying to ensure you get the same thing that you would get with the default "Rainmeter WebParser Plugin", while not sending that particular string, I don't know. Might be able to just use "Four Score and Seven Years Ago" or something. The point presumably is to have the User Agent string be "unknown" to the site. Not sure I would do that, as I can well imagine that any "known" User Agent string would be flagged as a "browser" and that's good, they assume you are seeing their advertising. Any "unknown" User Agent string, including our default, would likely be flagged as an "application", and that might be more of a black mark in their eyes.
User avatar
Yincognito
Posts: 2933
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ Weather.com

Post by Yincognito »

jsmorley wrote: June 17th, 2020, 7:01 pm Well, I just go to one of the many "What is my User Agent" websites and use the same as my Firefox browser uses. That is part of the point for me. As for trying to ensure you get the same thing that you would get with the default "Rainmeter WebParser Plugin", while not sending that particular string, I don't know. Might be able to just use "Four Score and Seven Years Ago" or something. The point presumably is to have the User Agent string be "unknown" to the site. Not sure I would do that, as I can well imagine that any "known" User Agent string would be flagged as a "browser" and that's good, they assume you are seeing their advertising. Any "unknown" User Agent string, including our default, would likely be flagged as an "application", and that might be more of a black mark in their eyes.
Ok then, thanks! :thumbup:
User avatar
Yincognito
Posts: 2933
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ Weather.com

Post by Yincognito »

jsmorley wrote: June 17th, 2020, 7:01 pmAs for trying to ensure you get the same thing that you would get with the default "Rainmeter WebParser Plugin", while not sending that particular string, I don't know.
Yeah, just applied setting the user agent and analyzed the results. Setting the user agent makes no difference in what is otherwise received by WebParser's Debug=2 option, the two files are identical, at 976 993 bytes. Saving the page source from the browser creates a similar UTF-8 document that is significantly different from the other two, at 1 306 773 bytes. It's not just the adds or whatever, it's also what I mentioned earlier in this or another thread ... the applicationId at the start of the document. I might be mistaken on this one, but if that's a way to detect if one is accessing weather.com using a browser or not (as the 2 WebParser documents had the same applicationId value - the same as the last time I checked it out using WebParser, i.e. ending in 989 -, different from what the browser produced), then I'm not sure setting the user agent is of much use.

Just curious, can you temporarily set a Debug=2 in your environment and then CTRL+F (i.e. find) the applicationId value in the downloaded WebParserDump.txt, to see if it also ends in 989? :???:
User avatar
jsmorley
Developer
Posts: 21561
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com

Post by jsmorley »

Yincognito wrote: June 17th, 2020, 8:17 pm Yeah, just applied setting the user agent and analyzed the results. Setting the user agent makes no difference in what is otherwise received by WebParser's Debug=2 option, the two files are identical, at 976 993 bytes. Saving the page source from the browser creates a similar UTF-8 document that is significantly different from the other two, at 1 306 773 bytes. It's not just the adds or whatever, it's also what I mentioned earlier in this or another thread ... the applicationId at the start of the document. I might be mistaken on this one, but if that's a way to detect if one is accessing weather.com using a browser or not (as the 2 WebParser documents had the same applicationId value - the same as the last time I checked it out using WebParser, i.e. ending in 989 -, different from what the browser produced), then I'm not sure setting the user agent is of much use.

Just curious, can you temporarily set a Debug=2 in your environment and then CTRL+F (i.e. find) the applicationId value in the downloaded WebParserDump.txt, to see if it also ends in 989? :???:
"applicationID":"296284162"

UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0
User avatar
Yincognito
Posts: 2933
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: ⭐ Weather.com

Post by Yincognito »

jsmorley wrote: June 18th, 2020, 12:00 am "applicationID":"296284162"

UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0
Yep. At first, I was surprised, because I expected to end in 989 in order to point out at Rainmeter (i.e. the same application), then tried with your default settings in your skin (i.e. 3 day forecast) and got something ending in 226, then changed to the 15 day forecast and got the same ending as you, aka 162 (I'm talking about endings here only to simplify the matters, as the latter means I got the same applicationId as you for the 15 day forecast, i.e. 296284162).

Then, just when I was preparing to reply to you that the applicationId is somehow "skin dependent" and not "Rainmeter dependent" ... I got the very same applicationId when dumping the WebParser result in my own skin. Then, the next time I tried got the 226 ending. :jawdrop So, eventually, I have no idea what this means, but my impression is still that weather.com has other means of differentiating between the browser and a specific application apart from reading the user agent (or maybe the applicationId for the broswer fluctuates in a similar manner as well?). I might be wrong with this or talk about something that isn't / won't be really relevant ... or not. We'll see. :confused:

Sorry to use you in this (so far) inconclusive test. I thought I got it all figured it out, but I guess I was mistaken.
User avatar
Active Colors
Moderator
Posts: 624
Joined: February 16th, 2012, 3:32 am

Re: ⭐ Weather.com

Post by Active Colors »

Thank you jsmorley for this skin and keeping it updated and other people for the common effort to keep this updated and simple for other users. Much love.
dgmele
Posts: 8
Joined: June 11th, 2020, 5:17 pm

Re: ⭐ Weather.com

Post by dgmele »

Active Colors wrote: June 26th, 2020, 9:55 am Thank you jsmorley for this skin and keeping it updated and other people for the common effort to keep this updated and simple for other users. Much love.
A resounding second!
ississi
Posts: 2
Joined: July 2nd, 2020, 9:15 am

Re: ⭐ Weather.com

Post by ississi »

Hi, newbie question: I love weather.com, but how do I get it to show 5 days of weather please? I've changed the ini to use @Include3=#@#WeatherComJSONMeasures5Day.inc
and refreshed, what do i need to do next, please?
Many thanks
User avatar
jsmorley
Developer
Posts: 21561
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ⭐ Weather.com

Post by jsmorley »

ississi wrote: July 2nd, 2020, 9:19 am Hi, newbie question: I love weather.com, but how do I get it to show 5 days of weather please? I've changed the ini to use @Include3=#@#WeatherComJSONMeasures5Day.inc
and refreshed, what do i need to do next, please?
Many thanks
There is no way to do this that is just a click or two. You are going to have to edit the skin.

You can scroll down in the meters and find [MeterTomorrowIcon], then copy from there down to the bottom and paste a copy at the bottom of the skin. Then go through all those copied meters, and change the section names from like [MeterTomorrowIcon] to [MeterDay3Icon], doing that for all meters. Then change the MeasureName values from like MeasureName=@ForecastDay2DayIcon to MeasureName=@ForecastDay3DayIcon, doing that for all meters.

Repeat this again for Day 4 and Day 5, following the same approach.

Once you are done, you will need to increase the height of the background shape:

Code: Select all

[MeterAllBackground]
Meter=Shape
Shape=Rectangle 0.5,0.5,169,322,12 | Fill Color #BackgroundColor# | StrokeWidth 1.5 | Stroke Color #FrameColor#
X=0
W=170
H=323
Changing the height of 322 in the Shape, and the height of the meter in H.

Then refresh...

While this is not a trivial amount of work, it's a BUNCH easier due to the @Include file approach that eliminates having to do all this for all the "measures" as well as the "meters". It's a lot of copy/paste/change to get the new meters you need, but really pretty straightforward.