It is currently March 30th, 2020, 1:18 pm

Challange for the PRO

Help with creating, editing & fixing problems with skins
User avatar
JamX
Posts: 108
Joined: October 4th, 2019, 2:46 pm

Challange for the PRO

Post by JamX »

Is it possible to capture this part:
Windfinder.JPG
from the site: https://www.windfinder.com/weatherforecast/olderplas_ool

Some coding would be appriciated. :bow:
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 10017
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Challange for the PRO

Post by balala »

Which part? All numbers from that table? I don't think it would be possible, because a WebParser measure can return up to 100 strings, not more.
But let's clarify first what would you like to get, because I'm not sure.
User avatar
JamX
Posts: 108
Joined: October 4th, 2019, 2:46 pm

Re: Challange for the PRO

Post by JamX »

Hi Balala,

You are right, this will be to much for the webparser
Fore sure if I want all the colored bars , icons, values, etc etc.

There is also a less detailed page: https://www.windfinder.com/forecast/olderplas_ool

Maybe better to be used
Windfinder3.JPG
And then only the first 3 days.

If this is still to much I'd settle with the 3 forcast days in the top.

And if possible all 3 days separate so I can put them on different locations in the skin
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 10017
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Challange for the PRO

Post by balala »

JamX wrote:
October 9th, 2019, 12:34 pm
There is also a less detailed page: https://www.windfinder.com/forecast/olderplas_ool
The following code gets the information from this site. For now it only parses the (first) current day, getting the time, the wind speed, wind gusts, air temperature and air pressure. These are shown on a simple skin. Please check it if this is what you want. Obviously there is a lot of work to get the information for the upcoming days, this is just a start to work with.

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[Variables]
Item=<span class="value">(.*)</span>.*<span class="units-ws">(.*)</span>.*<span class="units-ws">(.*)</span>.*<span class="units-at">(.*)</span>.*<span class="units-ap">(.*)</span>

[MeasureRainmeter]
Measure=WebParser
UpdateRate=870
Url=https://www.windfinder.com/forecast/olderplas_ool
RegExp=(?siU)<h4 class="weathertable__headline">(.*)</h4>.*#Item#.*#Item#.*#Item#.*#Item#.*#Item#.*#Item#.*#Item#.*#Item#

[MeasureDate1]
Measure=WebParser
Url=[MeasureRainmeter]

RegExpSubstitute=1
Substitute="\n":"","\s{2,}":""
StringIndex=1

[MeasureTime1]
Measure=WebParser
Url=[MeasureRainmeter]
RegExpSubstitute=1
Substitute="0(\d{1})h":"\1:00","(\d{2})h":"\1:00"
StringIndex=2

[MeasureWindSpeed1]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=3

[MeasureWindGusts1]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=4

[MeasureAirTemp1]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=5

[MeasureAirPress1]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=6

[MeasureTime2]
Measure=WebParser
Url=[MeasureRainmeter]
RegExpSubstitute=1
Substitute="0(\d{1})h":"\1:00","(\d{2})h":"\1:00"
StringIndex=7

[MeasureWindSpeed2]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=8

[MeasureWindGusts2]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=9

[MeasureAirTemp2]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=10

[MeasureAirPress2]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=11

[MeasureTime3]
Measure=WebParser
Url=[MeasureRainmeter]
RegExpSubstitute=1
Substitute="0(\d{1})h":"\1:00","(\d{2})h":"\1:00"
StringIndex=12

[MeasureWindSpeed3]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=13

[MeasureWindGusts3]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=14

[MeasureAirTemp3]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=15

[MeasureAirPress3]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=16

[MeasureTime4]
Measure=WebParser
Url=[MeasureRainmeter]
RegExpSubstitute=1
Substitute="0(\d{1})h":"\1:00","(\d{2})h":"\1:00"
StringIndex=17

[MeasureWindSpeed4]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=18

[MeasureWindGusts4]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=19

[MeasureAirTemp4]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=20

[MeasureAirPress4]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=21

[MeasureTime5]
Measure=WebParser
Url=[MeasureRainmeter]
RegExpSubstitute=1
Substitute="0(\d{1})h":"\1:00","(\d{2})h":"\1:00"
StringIndex=22

[MeasureWindSpeed5]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=23

[MeasureWindGusts5]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=24

[MeasureAirTemp5]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=25

[MeasureAirPress5]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=26

[MeasureTime6]
Measure=WebParser
Url=[MeasureRainmeter]
RegExpSubstitute=1
Substitute="0(\d{1})h":"\1:00","(\d{2})h":"\1:00"
StringIndex=27

[MeasureWindSpeed6]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=28

[MeasureWindGusts6]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=29

[MeasureAirTemp6]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=30

[MeasureAirPress6]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=31

[MeasureTime7]
Measure=WebParser
Url=[MeasureRainmeter]
RegExpSubstitute=1
Substitute="0(\d{1})h":"\1:00","(\d{2})h":"\1:00"
StringIndex=32

[MeasureWindSpeed7]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=33

[MeasureWindGusts7]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=34

[MeasureAirTemp7]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=35

[MeasureAirPress7]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=36

[MeasureTime8]
Measure=WebParser
Url=[MeasureRainmeter]
RegExpSubstitute=1
Substitute="0(\d{1})h":"\1:00","(\d{2})h":"\1:00"
StringIndex=37

[MeasureWindSpeed8]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=38

[MeasureWindGusts8]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=39

[MeasureAirTemp8]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=40

[MeasureAirPress8]
Measure=WebParser
Url=[MeasureRainmeter]
StringIndex=41

[Update]
Meter=STRING
MeasureName=MeasureDate1
MeasureName2=MeasureTime1
MeasureName3=MeasureWindSpeed1
MeasureName4=MeasureWindGusts1
MeasureName5=MeasureAirTemp1
MeasureName6=MeasureAirPress1
MeasureName7=MeasureTime2
MeasureName8=MeasureWindSpeed2
MeasureName9=MeasureWindGusts2
MeasureName10=MeasureAirTemp2
MeasureName11=MeasureAirPress2
MeasureName12=MeasureTime3
MeasureName13=MeasureWindSpeed3
MeasureName14=MeasureWindGusts3
MeasureName15=MeasureAirTemp3
MeasureName16=MeasureAirPress3
MeasureName17=MeasureTime4
MeasureName18=MeasureWindSpeed4
MeasureName19=MeasureWindGusts4
MeasureName20=MeasureAirTemp4
MeasureName21=MeasureAirPress4
MeasureName22=MeasureTime5
MeasureName23=MeasureWindSpeed5
MeasureName24=MeasureWindGusts5
MeasureName25=MeasureAirTemp5
MeasureName26=MeasureAirPress5
MeasureName27=MeasureTime6
MeasureName28=MeasureWindSpeed6
MeasureName29=MeasureWindGusts6
MeasureName30=MeasureAirTemp6
MeasureName31=MeasureAirPress6
MeasureName32=MeasureTime7
MeasureName33=MeasureWindSpeed7
MeasureName34=MeasureWindGusts7
MeasureName35=MeasureAirTemp7
MeasureName36=MeasureAirPress7
MeasureName37=MeasureTime8
MeasureName38=MeasureWindSpeed8
MeasureName39=MeasureWindGusts8
MeasureName40=MeasureAirTemp8
MeasureName41=MeasureAirPress8
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=%1#CRLF#%2 | %3 | %4 | %5[\x00B0]C | %6hPa#CRLF#%7 | %8 | %9 | %10[\x00B0]C | %11hPa#CRLF#%12 | %13 | %14 | %15[\x00B0]C | %16hPa#CRLF#%17 | %18 | %19 | %20[\x00B0]C | %21hPa#CRLF#%22 | %23 | %24 | %25[\x00B0]C | %26hPa#CRLF#%27 | %28 | %29 | %30[\x00B0]C | %31hPa#CRLF#%32 | %33 | %34 | %35[\x00B0]C | %36hPa#CRLF#%37 | %38 | %39 | %40[\x00B0]C | %41hPa
DynamicVariables=1
User avatar
JamX
Posts: 108
Joined: October 4th, 2019, 2:46 pm

Re: Challange for the PRO

Post by JamX »

Excellent!
Great work/start.

This skin will be for windsurfing forecasting.

The "luchtdruk" airpressure I do not need.

The Time, wind direction, wind speed, wind gust, weather Icon and precipitation I do need.

The vane I also can make myself based on the degrees of the wind.

Great to see your speedy response and off cause your knowledge.

PS. If this site changes his layout will the data then also be wrong?

Maybe stupid question:
Is the data from wxdata.weather.com not available at certain pre-defined hours. (5 -8 -11 - 14 - 17 - 20)hours?
User avatar
balala
Rainmeter Sage
Posts: 10017
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Challange for the PRO

Post by balala »

JamX wrote:
October 9th, 2019, 7:11 pm
Great work/start.
Ok, I'm glad if you got it working for now.
JamX wrote:
October 9th, 2019, 7:11 pm
The "luchtdruk" airpressure I do not need.
Ok, will remove it.
JamX wrote:
October 9th, 2019, 7:11 pm
The Time, wind direction, wind speed, wind gust, weather Icon and precipitation I do need.
It seems I'll have to add the wind direction, the weather icon and the precipitation.
JamX wrote:
October 9th, 2019, 7:11 pm
The vane I also can make myself based on the degrees of the wind.
I'm not sure I understand what you mean by "vane". What do you mean?
JamX wrote:
October 9th, 2019, 7:11 pm
PS. If this site changes his layout will the data then also be wrong?
Unfortunately in this case the skin won't work anymore, having to be rewritten.
JamX wrote:
October 9th, 2019, 7:11 pm
Maybe stupid question:
Is the data from wxdata.weather.com not available at certain pre-defined hours. (5 -8 -11 - 14 - 17 - 20)hours?
No, I think they are avilable all the time. There are no such pre-defined hours.
User avatar
JamX
Posts: 108
Joined: October 4th, 2019, 2:46 pm

Re: Challange for the PRO

Post by JamX »

JamX wrote: ↑
14 minutes ago
The vane I also can make myself based on the degrees of the wind.

I'm not sure I understand what you mean by "vane". What do you mean?
The wind direction icon
JamX wrote: ↑
15 minutes ago
Maybe stupid question:
Is the data from wxdata.weather.com not available at certain pre-defined hours. (5 -8 -11 - 14 - 17 - 20)hours?

No, I think they are available all the time. There are no such pre-defined hours.
What do you mean with "available all the time". You mean in the forecasting they only have the whole day forecast and not hourly periodes?
User avatar
balala
Rainmeter Sage
Posts: 10017
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Challange for the PRO

Post by balala »

JamX wrote:
October 9th, 2019, 7:31 pm
The wind direction icon
Ok, let's see how can we get it.
JamX wrote:
October 9th, 2019, 7:31 pm
What do you mean with "available all the time". You mean in the forecasting they only have the whole day forecast and not hourly periodes?
I suppose they indeed have no hourly periods.

Unfortunately I don't work today with this code, because slightly - slightly here is too late to furtherly work. Will continue tomorrow, if you don't mind. Sorry...
User avatar
JamX
Posts: 108
Joined: October 4th, 2019, 2:46 pm

Re: Challange for the PRO

Post by JamX »

No problem.. :thumbup:

But maybe you could also have a look at this site:
https://windy.app/forecast2/spot/37930/Roermond+Oolderplas
Windy.JPG
They also have a widget you can install on a site with this code.
"<div
data-windywidget="forecast"
data-spotid="37930"
data-appid="5e7b8236ff0cf30bc2e491953dc99f8a">
</div>
<script async="true" data-cfasync="false" type="text/javascript" src="https://windyapp.co/widget/windy_forecast_async.js"></script>"

This javascript file could also be a more structured and stable datasource
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 10017
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Challange for the PRO

Post by balala »

JamX wrote:
October 9th, 2019, 7:59 pm
This javascript file could also be a more structured and stable datasource
Unfortunately Rainmeter can't use sites running java scripts. So, we have to stay on the previous site.