Hello,
i want to do a own Rainmeterweatherskin, but i get a failure reponse with this RegExp-Line.
This is the Originalline:
[FontAwesome]<img src="https://cs3.wettercomassets.com/wcomv5/images/icons/weather/n_1.svg" data-target-size="medium/small" data-target-variant="" alt="leicht bewölkt" title="überwiegend blauer Himmel, 1/8 bis 3/8 des Himmels sind mit Wolken bedeckt">[/FontAwesome]
I want this icon [FontAwesome]"https://cs3.wettercomassets.com/wcomv5/images/icons/weather/n_1.svg"[/FontAwesome]
I do: [FontAwesome]<img src="(.*)" data-target-size="medium/small" data-target-variant="" alt="leicht bewölkt" title="überwiegend blauer Himmel, 1/8 bis 3/8 des Himmels sind mit Wolken bedeckt">[/FontAwesome]
How i can do that?
And a another question. Can I use the Webparser.dll Plugin? Is it still supportet?
It is currently April 23rd, 2024, 9:51 pm
RegExp - Picture
-
- Posts: 3
- Joined: May 9th, 2020, 10:53 pm
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: RegExp - Picture
What is the URL to the site where this string containing the location of the icon is found?
-
- Posts: 908
- Joined: December 30th, 2015, 9:47 am
Re: RegExp - Picture
Hi Blackjack
I don't know the target URL, so I tried with file saved from your Originalline. Following test code does work.
Ps. Webparser.dll plugin is now included in Rainmeter as a Measure. So, its usage is as above.
I don't know the target URL, so I tried with file saved from your Originalline. Following test code does work.
Code: Select all
[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=192,192,192,192
[mGetPath]
Measure=WebParser
URL=File://(target data path)
RegExp=(?siU).*<img src="(.*)".*
StringIndex=1
[MeterPath]
Meter=String
MeasureName=mGetPath
X=5
Y=5
W=300
H=30
ClipString=1
Text=%1
You do not have the required permissions to view the files attached to this post.
-
- Posts: 908
- Joined: December 30th, 2015, 9:47 am
Re: RegExp - Picture
Sorry, my above post is really not enough. Of course, your target html must includes multiple <img src=...please ignore my post.
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: RegExp - Picture
Yeah, we need the correct source URL to be able to help much.
-
- Posts: 3
- Joined: May 9th, 2020, 10:53 pm
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: RegExp - Picture
The trouble is that there are a lot of places in the source that look like that. How do we know when we have the right one?
-
- Rainmeter Sage
- Posts: 7151
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: RegExp - Picture
This will let you browse the weekdays in the source URL, to display their dates and their associated image URLs on left clicking the mouse:Blackjack wrote: ↑May 10th, 2020, 1:29 am Hi,
https://www.wetter.com/deutschland/dortmund/DE0002221.html
that is the source URL
Code: Select all
[Variables]
TabTag=.*<a data-label="VHSTabTag_\d+".*>.*<div>\s*?(.*)\s*?</div>.*<img src=".*".*data-single-src="(.*)".*</a>.*
TabTag16=.*<a data-label="VHSTabTag_16".*>.*</a>.*
NavigationGrid=.*<div class="\[ forecast-navigation-grid \]">#TabTag##TabTag##TabTag##TabTag##TabTag##TabTag##TabTag##TabTag16#</div>.*
SIndex=1
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=47,47,47,255
[MeasureData]
Measure=WebParser
URL=https://www.wetter.com/deutschland/dortmund/DE0002221.html
RegExp=(?siU)#NavigationGrid#.*<script src=".*">.*
UpdateRate=600
StringIndex=#SIndex#
DynamicVariables=1
[MeterData]
Meter=String
MeasureName=MeasureData
FontFace=Consolas
FontColor=255,255,255,255
FontSize=16
AntiAlias=1
Text=%1
LeftMouseUpAction=[!SetVariable SIndex ((#SIndex#>=7*2)?(1):(#SIndex#+1))][!CommandMeasure MeasureData Update][!UpdateMeter MeterData][!Redraw]
DynamicVariables=1
-
- Posts: 3
- Joined: May 9th, 2020, 10:53 pm
Re: RegExp - Picture
Thanks to all
I thought I understood how Webharser worked
My first idea was the Rainmeter Skin from Geentel (https://www.deviantart.com/quantumfoam1/art/Genteel-424854440) to use. But that didnt worked. Then I read the tutorials and looked at other skins. It's harder than I thought. Haha. Thanks again.
I thought I understood how Webharser worked
My first idea was the Rainmeter Skin from Geentel (https://www.deviantart.com/quantumfoam1/art/Genteel-424854440) to use. But that didnt worked. Then I read the tutorials and looked at other skins. It's harder than I thought. Haha. Thanks again.