Im talking about get info (with webparser and this "RegExp=(?siU)") for newbe? If you want more info i want to extract and print info from THISinto a plugin :P (meteo info) and some server status pages ;P
Thank you!!
It is currently September 29th, 2024, 9:22 am
get info from web tutorial?
-
- Posts: 58
- Joined: January 10th, 2015, 3:14 pm
-
- Rainmeter Sage
- Posts: 5534
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: get info from web tutorial?
I would suggest reading the WebParser tutorial.
Then use jsmorley's RainRegExp Tool.
That site offers an XML content address: http://opendata.euskadi.eus/contenidos/ds_meteorologicos/estaciones_meteorologicas/opendata/estaciones.xml
Enter the address in the RegExp tool, 'Connect', and use that tool to develop a RegExp to get the information you want.
WebParser is one of the more difficult plugins to use... Help is available from forum members if needed.
EDIT: There are literally 1,000's of details available from the different areas of that site! With a 99 item limit of Webparser, you are going to need multiple RegExps and Webparser measures to access!
For example, the XML link I gave from the first page, has 202 individual items, with links to 3~4 pages of more data.
This RegExp will parse them, but only the first 99 can be assigned StringIndexes in child measures...
RegExp=(?siU).*<row num="(.*)".*<documentname>(.*)<.*<physicalurl>(.*)<.*(?(?=<row num=").*<row num="(.*)".*<documentname>(.*)<.*<physicalurl>(.*)<).* Without knowing what information you want, and due to the extent of information available, I am sure this will be a monumental undertaking, and not something I would recommend for a first attempt, using Rainmeter.
But don't let me discourage you from trying.
Then use jsmorley's RainRegExp Tool.
That site offers an XML content address: http://opendata.euskadi.eus/contenidos/ds_meteorologicos/estaciones_meteorologicas/opendata/estaciones.xml
Enter the address in the RegExp tool, 'Connect', and use that tool to develop a RegExp to get the information you want.
WebParser is one of the more difficult plugins to use... Help is available from forum members if needed.
EDIT: There are literally 1,000's of details available from the different areas of that site! With a 99 item limit of Webparser, you are going to need multiple RegExps and Webparser measures to access!
For example, the XML link I gave from the first page, has 202 individual items, with links to 3~4 pages of more data.
This RegExp will parse them, but only the first 99 can be assigned StringIndexes in child measures...
RegExp=(?siU).*<row num="(.*)".*<documentname>(.*)<.*<physicalurl>(.*)<.*(?(?=<row num=").*<row num="(.*)".*<documentname>(.*)<.*<physicalurl>(.*)<).* Without knowing what information you want, and due to the extent of information available, I am sure this will be a monumental undertaking, and not something I would recommend for a first attempt, using Rainmeter.
But don't let me discourage you from trying.
You do not have the required permissions to view the files attached to this post.
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 58
- Joined: January 10th, 2015, 3:14 pm
Re: get info from web tutorial?
Omg didnt notice about the tutorial xD, the rainregexp program will be usefull too. Thank you!! The link i post is from ALL stations on my community (it's like the US "states") and there is a lot of them, i need to select one station but i saw that page doesnt have "predictions" only information about LAST hours so i'll use weather.com api (i think this is it http://www.wunderground.com/weather/api) to catch the rain precipitation and humidity info
I can hit my head to the wall but ill not stop trying. Im still searching a solution for my sloth AdvancedCPU.dll and searching for a few fixes for this(csgo items needs to be on red but doesnt change xD)
Doing this is funny, and when something works as it should im proud of it xD sounds weird but i think all of us feels same when we start doing this.
I can hit my head to the wall but ill not stop trying. Im still searching a solution for my sloth AdvancedCPU.dll and searching for a few fixes for this(csgo items needs to be on red but doesnt change xD)
Doing this is funny, and when something works as it should im proud of it xD sounds weird but i think all of us feels same when we start doing this.
-
- Posts: 58
- Joined: January 10th, 2015, 3:14 pm
Re: get info from web tutorial?
Ok, i hit a HUGE wall with wire fences and a minefield arround xD I have the file ready (+1.000 lines of code) But now when i try to "print" some info it doesnt show and i dont know why.
I wrote another little code to "test" and same happens, maybe a bad string or something? I read and checked the webparser + 3.3 manual several times and still cant find the error. The webparser picks the info but doesnt print!Im going to bed now... 7:20 am XD Im going to drop the pc trought the window to prevent this crazy nights
Thank you!
I wrote another little code to "test" and same happens, maybe a bad string or something? I read and checked the webparser + 3.3 manual several times and still cant find the error. The webparser picks the info but doesnt print!Im going to bed now... 7:20 am XD Im going to drop the pc trought the window to prevent this crazy nights
Code: Select all
[Rainmeter]
Update=1000
[Metadata]
[Variables]
; ===========================
; MEASURES return some kind of value
; ===========================
[measureAPILink]
Measure=Plugin
Plugin=WebParser.dll
UpdateRate=1000
Url=http://wxdata.weather.com/wxdata/weather/local/SPXX0016:1:SP?cc=*&unit=M&dayf=0
RegExp="(?siU)<r>(.*)</r>"
[measure1]
Measure:Plugin
Plugin=WebParser.dll
Url=[measureAPILink]
StringIndex=1
; =============================
; METERS display images, text, bars, etc.
; =============================
[meterLabel1]
Meter=STRING
AntiAlias=1
FontSize=11
FontColor=252,251,202,255
Text=Pressure:
[meterValue1]
Meter=STRING
MeasureName=measure1
FontColor=255,0,0
-
- Developer
- Posts: 22783
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: get info from web tutorial?
First:
Second (and the root cause of your problem):
Third:
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
Code: Select all
[measureAPILink]
Measure=Plugin
Code: Select all
[meterLabel1]
Meter=STRING
FontSize=11
FontColor=252,251,202,255
AntiAlias=1
Text=Pressure:
[meterValue1]
Meter=STRING
MeasureName=measure1
X=5R
FontSize=11
FontColor=255,0,0
AntiAlias=1
-
- Posts: 58
- Joined: January 10th, 2015, 3:14 pm
Re: get info from web tutorial?
Maybe im blind but the measureAPILink it's the same as yours so i dont see the problem there :P AntiAlias for edge smoothing, didnt know it's so important. Still doesnt print any info but thank youjsmorley wrote:First:
Second (and the root cause of your problem):Code: Select all
[Rainmeter] Update=1000 DynamicWindowSize=1 AccurateText=1
Third:Code: Select all
[measureAPILink] Measure=Plugin
Code: Select all
[meterLabel1] Meter=STRING FontSize=11 FontColor=252,251,202,255 AntiAlias=1 Text=Pressure: [meterValue1] Meter=STRING MeasureName=measure1 X=5R FontSize=11 FontColor=255,0,0 AntiAlias=1
-
- Developer
- Posts: 22783
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: get info from web tutorial?
You have:
[measureAPILink]
Measure:Plugin
It needs to be:
[measureAPILink]
Measure=Plugin
So yes, you are blind...
[measureAPILink]
Measure:Plugin
It needs to be:
[measureAPILink]
Measure=Plugin
So yes, you are blind...
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
Re: get info from web tutorial?
I also think to be blind, since I see the problem is in [measure1]
-
- Developer
- Posts: 22783
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: get info from web tutorial?
No problem with [measure1]fonpaolo wrote:I also think to be blind, since I see the problem is in [measure1]
What I changed was:
In [Rainmeter] I added DynamicWindowSize=1, which is very important with WebParser skins.
In [measureAPILink] I changed Plugin:WebParser to Plugin=WebParser
in [meterValue1] I added X=5R so the value is positioned after the label, instead of on top of it.
-
- Posts: 58
- Joined: January 10th, 2015, 3:14 pm
Re: get info from web tutorial?
He says the problem was on [measure1] because is there where i have the wrong ":", not in [measureAPILink] look again to my first
Than you both!!
EDIT: Obviously it works fine now!
Code: Select all
EDIT: Obviously it works fine now!
Last edited by Zaragan on January 24th, 2016, 2:04 pm, edited 1 time in total.