It is currently December 7th, 2022, 1:00 pm

Anita Weather help

Get help with creating, editing & fixing problems with skins
Eaglerock
Posts: 3
Joined: September 18th, 2022, 10:47 am

Anita Weather help

Post by Eaglerock »

Hi everyone. I have been using Anita for a long time as it works with my dual monitor setup well.
Suddenly couple of days ago the weather stopped reporting, im geussing it is something to do with Yahoo and RegExp?
Could you please help me fix it, here is the current code:

Code: Select all

[MeasureWeather]
Measure=Plugin
Plugin=WebParser
Url=https://www.yahoo.com/news/weather
RegExp=(?siU)<h1 class="city.*data-reactid="7">(.*)</h1>.*data-reactid="8">(.*)</div></div></div><div.*<div class="My\(2px\).*60x60\/(.*)@2x.png.*data-reactid="26">(.*)<.*<span class="Va\(m\) Px\(6px\)" data-reactid="29"><\!-- react-text: 30 -->(.*)<.*data-reactid="33"><\!-- react-text: 34 -->(.*)<.*<span class="Va\(t\)" data-reactid="37">(.*)</span>.*data-reactid="477">(.*)°</div></li><li
UpdateRate=900
User avatar
xenium
Posts: 719
Joined: January 4th, 2018, 9:52 pm

Re: Anita Weather help

Post by xenium »

Eaglerock wrote: September 18th, 2022, 10:51 am Hi everyone. I have been using Anita for a long time as it works with my dual monitor setup well.
Suddenly couple of days ago the weather stopped reporting, im geussing it is something to do with Yahoo and RegExp?
Could you please help me fix it, here is the current code:

Code: Select all

[MeasureWeather]
Measure=Plugin
Plugin=WebParser
Url=https://www.yahoo.com/news/weather
RegExp=(?siU)<h1 class="city.*data-reactid="7">(.*)</h1>.*data-reactid="8">(.*)</div></div></div><div.*<div class="My\(2px\).*60x60\/(.*)@2x.png.*data-reactid="26">(.*)<.*<span class="Va\(m\) Px\(6px\)" data-reactid="29"><\!-- react-text: 30 -->(.*)<.*data-reactid="33"><\!-- react-text: 34 -->(.*)<.*<span class="Va\(t\)" data-reactid="37">(.*)</span>.*data-reactid="477">(.*)°</div></li><li
UpdateRate=900
Right click on the skin and choose Edit Skin.
Replace the code section starting with [MeasureWeather] and ending with [MeasureTempFahrenheit] with the code section below:

Code: Select all

[MeasureWeather]
Measure=Plugin
Plugin=WebParser
Url=https://www.yahoo.com/news/weather
RegExp=(?siU)<h1 class="city.*data-reactid="7">(.*)</h1>.*<div class="My\(2px\).*60x60\/(.*)@2x.png.*data-reactid=".*">(.*)<.*</div><div class="high-low .*".* data-icon="arrow-up".*data-reactid=".*"><!-- react-text: .* -->(.*)<!.*data-icon="arrow-down".*data-reactid=".*"><!-- react-text: .* -->(.*)<!.*<div class="now .*".*data-reactid=".*"><span class=".*" data-reactid=".*">(.*)</span>
UpdateRate=900

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeasureLocation]
Measure=Plugin
Plugin=WebParser
URL=[MeasureWeather]
StringIndex=1

[MeasureIcon]
Measure=Plugin
Plugin=WebParser
URL=[MeasureWeather]
StringIndex=2
DynamicVariables=1
Substitute="rain_day_night":"rain","scattered_showers_day_night":"rain","windy_day_night":"wind","mostly_cloudy_day_night":"cloudy","cloudy_day_night":"cloudy","snow_rain_mix_day_night":"sleet","fair_day":"clear_day","fair_night":"clear_night","flurries_day_night":"snow","snow_day_night":"snow","thundershowers_day_night":"thunder","fog_day_night":"fog"

[MeasureDescription]
Measure=Plugin
Plugin=WebParser
URL=[MeasureWeather]
StringIndex=3

[MeasureMaxTemperatureDayFahrenheit]
Measure=Plugin
Plugin=WebParser
URL=[MeasureWeather]
StringIndex=4

[MeasureMinTemperatureNightFahrenheit]
Measure=Plugin
Plugin=WebParser
URL=[MeasureWeather]
StringIndex=5

[MeasureTempFahrenheit]
Measure=Plugin
Plugin=WebParser
URL=[MeasureWeather]
StringIndex=6

Then save and refresh the skin
Eaglerock
Posts: 3
Joined: September 18th, 2022, 10:47 am

Re: Anita Weather help

Post by Eaglerock »

xenium wrote: September 18th, 2022, 2:33 pm Right click on the skin and choose Edit Skin.
Replace the code section starting with [MeasureWeather] and ending with [MeasureTempFahrenheit] with the code section below:

Code: Select all

[MeasureWeather]
Measure=Plugin
Plugin=WebParser
Url=https://www.yahoo.com/news/weather
RegExp=(?siU)<h1 class="city.*data-reactid="7">(.*)</h1>.*<div class="My\(2px\).*60x60\/(.*)@2x.png.*data-reactid=".*">(.*)<.*</div><div class="high-low .*".* data-icon="arrow-up".*data-reactid=".*"><!-- react-text: .* -->(.*)<!.*data-icon="arrow-down".*data-reactid=".*"><!-- react-text: .* -->(.*)<!.*<div class="now .*".*data-reactid=".*"><span class=".*" data-reactid=".*">(.*)</span>
UpdateRate=900

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeasureLocation]
Measure=Plugin
Plugin=WebParser
URL=[MeasureWeather]
StringIndex=1

[MeasureIcon]
Measure=Plugin
Plugin=WebParser
URL=[MeasureWeather]
StringIndex=2
DynamicVariables=1
Substitute="rain_day_night":"rain","scattered_showers_day_night":"rain","windy_day_night":"wind","mostly_cloudy_day_night":"cloudy","cloudy_day_night":"cloudy","snow_rain_mix_day_night":"sleet","fair_day":"clear_day","fair_night":"clear_night","flurries_day_night":"snow","snow_day_night":"snow","thundershowers_day_night":"thunder","fog_day_night":"fog"

[MeasureDescription]
Measure=Plugin
Plugin=WebParser
URL=[MeasureWeather]
StringIndex=3

[MeasureMaxTemperatureDayFahrenheit]
Measure=Plugin
Plugin=WebParser
URL=[MeasureWeather]
StringIndex=4

[MeasureMinTemperatureNightFahrenheit]
Measure=Plugin
Plugin=WebParser
URL=[MeasureWeather]
StringIndex=5

[MeasureTempFahrenheit]
Measure=Plugin
Plugin=WebParser
URL=[MeasureWeather]
StringIndex=6

Then save and refresh the skin

Xenium, thank you so much, ill try it now. does it make a differance that im using Celsius?
User avatar
xenium
Posts: 719
Joined: January 4th, 2018, 9:52 pm

Re: Anita Weather help

Post by xenium »

Eaglerock wrote: September 18th, 2022, 3:19 pm Xenium, thank you so much, ill try it now. does it make a differance that im using Celsius?
Yahoo's HTML source contains the temperatures in Fahrenheit and the skin converts them to Celsius.
By default, the skin displays the temperature in Celsius.
For settings, right-click on the skin and choose Custom Skin Actions
Eaglerock
Posts: 3
Joined: September 18th, 2022, 10:47 am

Re: Anita Weather help

Post by Eaglerock »

xenium wrote: September 18th, 2022, 3:32 pm Yahoo's HTML source contains the temperatures in Fahrenheit and the skin converts them to Celsius.
By default, the skin displays the temperature in Celsius.
For settings, right-click on the skin and choose Custom Skin Actions
Amazing, thank you so much for the help <3