It is currently May 2nd, 2024, 7:17 am
WebParser.dll & RegExp Help?
-
- Posts: 11
- Joined: August 2nd, 2012, 8:03 am
Re: WebParser.dll & RegExp Help?
I figured out how to get information for other posts, but I still can't figure out how to fix the 'Not enough substrings!' problem
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: WebParser.dll & RegExp Help?
"Not enough substrings" means you are trying to use a StringIndex number that does not exist. You need to count the number of "(.*)" captures you are retrieving with your RegExp, and that is the number of StringIndexes available.
-
- Posts: 11
- Joined: August 2nd, 2012, 8:03 am
Re: WebParser.dll & RegExp Help?
It was in one line but when I copied it to this forum it somehow changed.
-
- Posts: 11
- Joined: August 2nd, 2012, 8:03 am
Re: WebParser.dll & RegExp Help?
I did count the number of "(.*) and there is 10. It says "Not enough substrings" for StringIndex=1 to 10.
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: WebParser.dll & RegExp Help?
Post your entire skin again, now that you have corrected the RegExp to work for you. I don't get anything at all with the skin above, as it just returns a "matching error" on the RegExp.
-
- Posts: 11
- Joined: August 2nd, 2012, 8:03 am
Re: WebParser.dll & RegExp Help?
I tried the RegExp in RainRegExp and it shows the output I want.
Code: Select all
[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=000000dd
DynamicWindowSize=1
[Metadata]
License=Creative Commons BY-NC-SA 3.0
Version=1.0.0
[Variables]
;|________________________________________________________________________________________________________________
;|
;| WEBSITE MEASURES
;|
;|________________________________________________________________________________________________________________
[MeasureWebsite]
Measure=Plugin
Plugin=WebParser
Url=http://doctorwhotv.co.uk/
CodePage=65001
Download=1
DownloadFile=DrWho.txt
FinishAction=!EnableMeasure MeasureTextFile
UpdateRate=3600
[MeasureTextFile]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=file://#CURRENTPATH#DownloadFile\DrWho.txt
RegExp="(?siU).*</h2><ul>.*<li class="cat-post-item">.*<a href="(.*)" title="(.*)">.*src="(.*)".*class="post-date">(.*)</p>.*<p>(.*).</p>.*<li class="cat-post-item">.*<a href="(.*)" title="(.*)">.*src="(.*)".*class="post-date">(.*)</p>.*<p>(.*).</p>.*"
FinishAction=!DisableMeasure MeasureTextFile
Disabled=1
;|________________________________________________________________________________________________________________
;|
;| NEWS 1
;|
;|________________________________________________________________________________________________________________
;_________________________________________________________________________________________________________________
;______________MEASURES
;_________________________________________________________________________________________________________________
[MeasureLink]
Measure=Plugin
Plugin=WebParser.dll
Url=[MeasureTextFile]
StringIndex=1
[MeasureTitle]
Measure=Plugin
Plugin=WebParser.dll
Url=[MeasureTextFile]
StringIndex=2
[MeasureImage]
Measure=Plugin
Plugin=WebParser.dll
Url=[MeasureTextFile]
Download=1
StringIndex=3
[MeasurePostDate]
Measure=Plugin
Plugin=WebParser.dll
Url=[MeasureTextFile]
StringIndex=4
[MeasureSummary]
Measure=Plugin
Plugin=WebParser.dll
Url=[MeasureTextFile]
StringIndex=5
;_________________________________________________________________________________________________________________
;______________METERS
;_________________________________________________________________________________________________________________
[MeterTitle]
Meter=STRING
MeasureName=MeasureTitle
FontColor=ffffff
FontSize=12
Antialias=1
Text="Title: %1"
[MeterLink]
Meter=STRING
MeasureName=MeasureLink
FontColor=ffffff
FontSize=12
Y=18r
Antialias=1
Text="Link: %1"
[MeterImage]
Meter=IMAGE
MeasureName=MeasureImage
Y=24r
Antialias=1
[MeterPostDate]
Meter=STRING
MeasureName=MeasurePostDate
FontColor=ffffff
FontSize=12
Y=18r
Antialias=1
Text="PostDate: %1"
[MeterSummary]
Meter=STRING
MeasureName=MeasureSummary
FontColor=ffffff
FontSize=12
Y=18r
Antialias=1
Text="Summary: %1"
;|________________________________________________________________________________________________________________
;|
;| NEWS 2
;|
;|________________________________________________________________________________________________________________
;_________________________________________________________________________________________________________________
;______________MEASURES
;_________________________________________________________________________________________________________________
[MeasureLink2]
Measure=Plugin
Plugin=WebParser.dll
Url=[MeasureTextFile]
StringIndex=6
[MeasureTitle2]
Measure=Plugin
Plugin=WebParser.dll
Url=[MeasureTextFile]
StringIndex=7
[MeasureImage2]
Measure=Plugin
Plugin=WebParser.dll
Url=[MeasureTextFile]
Download=1
StringIndex=8
[MeasurePostDate2]
Measure=Plugin
Plugin=WebParser.dll
Url=[MeasureTextFile]
StringIndex=9
[MeasureSummary2]
Measure=Plugin
Plugin=WebParser.dll
Url=[MeasureTextFile]
StringIndex=10
;_________________________________________________________________________________________________________________
;______________METERS
;_________________________________________________________________________________________________________________
[MeterTitle2]
Meter=STRING
MeasureName=MeasureTitle2
FontColor=ffffff
FontSize=12
Antialias=1
Y=200
Text="Title: %1"
[MeterLink2]
Meter=STRING
MeasureName=MeasureLink2
FontColor=ffffff
FontSize=12
Y=18r
Antialias=1
Text="Link: %1"
[MeterImage2]
Meter=IMAGE
MeasureName=MeasureImage2
Y=24r
Antialias=1
[MeterPostDate2]
Meter=STRING
MeasureName=MeasurePostDate2
FontColor=ffffff
FontSize=12
Y=18r
Antialias=1
Text="PostDate: %1"
[MeterSummary2]
Meter=STRING
MeasureName=MeasureSummary2
FontColor=ffffff
FontSize=12
Y=18r
Antialias=1
Text="Summary: %1"
-
- Posts: 11
- Joined: August 2nd, 2012, 8:03 am
Re: WebParser.dll & RegExp Help?
RegExp="(?siU).*</h2><ul>.*<li class="cat-post-item">.*<a href="(.*)" title="(.*)">.*src="(.*)".*class="post-date">(.*)</p>.*<p>(.*).</p>.*<li class="cat-post-item">.*<a href="(.*)" title="(.*)">.*src="(.*)".*class="post-date">(.*)</p>.*<p>(.*).</p>.*"
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: WebParser.dll & RegExp Help?
Not sure why it is working in RainRegExp for you, it certainly isn't for me.
Error = 1: Could not match all searches.
Error = 1: Could not match all searches.
-
- Posts: 11
- Joined: August 2nd, 2012, 8:03 am
Re: WebParser.dll & RegExp Help?
It has to do something with Rainmeter forums. When I copy it directly from my skin to RainRegExp it works, but when I copy the same text from this forum it doesn't work.
Is there any other way I could send it to you? Maybe on DeviantArt?
Is there any other way I could send it to you? Maybe on DeviantArt?
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: WebParser.dll & RegExp Help?
Just zip up the skin and attach it here.davidwroxy wrote:It has to do something with Rainmeter forums. When I copy it directly from my skin to RainRegExp it works, but when I copy the same text from this forum it doesn't work.
Is there any other way I could send it to you? Maybe on DeviantArt?