@Polaris
Salut!
Like "jsmorley" already said RSS feed will be easier to parse, but in your case the feed available don't suit your needs.
You really have to study the website when you parsing the source code of a web page, some have dynamic codes who change when a particular condition occur and will break the RegExp code.
If you want to download the weather icon you have to add: DownloadFile=image.png this will create a DownloadFile folder in the skin, and the icon will be replace each time with the name image.png
if you don't the image will be downloaded in the Rainmeter Temp folder, but you could end up with more than one image (33.png 26.png etc)
[Measure_Image]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeather]
StringIndex=1
Download=1
DownloadFile=image.png
[Meter_Image]
Meter=IMAGE
MeasureName=Measure_Image
X=20
Y=20
Also you have to avoid French word with punctuation like: <strong>Humidité</strong><br> the webparser of Rainmeter don't like those punctuations in the RegExp code.
Replace: <strong>Humidité</strong><br> like this: <strong>.*</strong><br>
I did a RegExp code with the web page behaviour that I have encounter at the moment, the code seem to work for now...
Code: Select all
-------------------------------------------
RegExp="(?siU)<div id="current_box_icon"><img class="transparent" src="(.*)".*<div id="current_box_temp">(.*)</div>.*<font color="#666666">Temp\. ressentie\s*(\S.*)\s*</font><br>.*<b>(.*)</b>.*<strong>Vent</strong><br>\s*(\S.*)\s*\n\s*(\S.*)\s*<br><br>.*<strong>.*</strong><br>\s*(\S.*)<br>.*<strong>Pression</strong><br>\s*(\S.*)<br>.*<strong>.*</strong><br>\s*(\S.*)<br>.*<strong>.*</strong><br>\s*(\S.*)\s*</div>"
[MeasureWeather] (Index 1) http://i.fr.imwx.com/global/images/93x93/30.png
[MeasureWeather] (Index 2) 28°C
[MeasureWeather] (Index 3) 27°C
[MeasureWeather] (Index 4) Peu nuageux
[MeasureWeather] (Index 5) Du nord Ã
[MeasureWeather] (Index 6) 11 km/h
[MeasureWeather] (Index 7) 30%
[MeasureWeather] (Index 8) 1Â 018,96 mb
[MeasureWeather] (Index 9) 9°C
[MeasureWeather] (Index 10) 10 km
--------------------------------------------
Skin Code:
[Rainmeter]
Author=GhostMatrix
Update=1000
[Variables]
Url=http://fr.weather.com/weather/today-Lyon-FRXX0055
FontName=Arial
TxtColor=255,255,255,200
[MeasureWeather]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1800
Url=#Url#
RegExp="(?siU)<div id="current_box_icon"><img class="transparent" src="(.*)".*<div id="current_box_temp">(.*)</div>.*<font color="#666666">Temp\. ressentie\s*(\S.*)\s*</font><br>.*<b>(.*)</b>.*<strong>Vent</strong><br>\s*(\S.*)\s*\n\s*(\S.*)\s*<br><br>.*<strong>.*</strong><br>\s*(\S.*)<br>.*<strong>Pression</strong><br>\s*(\S.*)<br>.*<strong>.*</strong><br>\s*(\S.*)<br>.*<strong>.*</strong><br>\s*(\S.*)\s*</div>"
StringIndex=1
CodePage=28591
FinishAction=!RainmeterRedraw
Debug=1
[Measure_Image]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeather]
StringIndex=1
Download=1
DownloadFile=image.png
[Measure_Temperature]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeather]
StringIndex=2
Substitute="°C":"°"
[Measure_Temperature_Ressentie]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeather]
StringIndex=3
Substitute="°C":"°"
[Measure_Condition]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeather]
StringIndex=4
[Measure_Vent_A]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeather]
StringIndex=5
Substitute="Ã":"à"
[Measure_Vent_B]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeather]
StringIndex=6
[Measure_Humidite]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeather]
StringIndex=7
[Measure_Presion]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeather]
StringIndex=8
Substitute="Ã":""
[Measure_DewPoint]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeather]
StringIndex=9
Substitute="°C":"°"
[Measure_Visibilite]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeather]
StringIndex=10
[Meter_Image]
Meter=IMAGE
MeasureName=Measure_Image
X=20
Y=20
[Meter_Background]
Meter=IMAGE
ImageName=img\back.png
X=0
Y=0
[Meter_Temperature]
MeasureName=Measure_Temperature
Meter=STRING
X=150
Y=55
FontColor=#TxtColor#
StringStyle=bolditalic
FontSize=17
StringAlign=CENTER
FontFace=#FontName#
Text="%1"
Antialias=1
[Meter_Condition]
MeasureName=Measure_Condition
Meter=STRING
X=123
Y=110
FontColor=#TxtColor#
StringStyle=bolditalic
FontSize=10
StringAlign=CENTER
FontFace=#FontName#
Text="%1"
Antialias=1
[Meter_Vent_Titre]
Meter=STRING
X=125
Y=130
FontColor=#TxtColor#
StringStyle=bolditalic
FontSize=9
StringAlign=CENTER
FontFace=#FontName#
Text="Vent:"
Antialias=1
[Meter_Vent]
MeasureName=Measure_Vent_A
MeasureName2=Measure_Vent_B
Meter=STRING
X=0r
Y=11r
FontColor=#TxtColor#
StringStyle=bolditalic
FontSize=9
StringAlign=CENTER
FontFace=#FontName#
Text="%1%2"
Antialias=1
GM