It is currently March 29th, 2024, 12:35 am

Capture problem

Get help with creating, editing & fixing problems with skins
PtitChat107
Posts: 126
Joined: December 31st, 2015, 6:40 pm

Capture problem

Post by PtitChat107 »

Hi,
I would like to know if anyone could help me understand why I can not get any of these two results; yet during one of my tests I managed to recover the measure of gold but after an update of the skin, nothing more. :?

Code: Select all

[Variables]
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205

### Measures ###

[MeasureGold]
Measure=Plugin
Plugin=WebParser
Url=http://www.24hgold.com/francais/cours_or_argent.aspx?money=Eur
UpdateRate=60
StringIndex=1
Substitute="":"..."
RegExp=(?siU)<span id="ctl00_BodyContent_lbDevKgPrice">(.*)</span>.*

[MeasureSilver]
Measure=Plugin
Plugin=WebParser
Url=http://www.24hgold.com/francais/cours_or_argent.aspx?money=Eur
UpdateRate=60
StringIndex=1
Substitute="":"..."
RegExp=(?siU)<span id="ctl00_BodyContent_Span58">(.*)</span>.*

[meterLabelGold]
Meter=String
MeterStyle=styleLeftText
X=10
Y=180
W=190
H=14
Text=Or

[meterValueGold]
Meter=String
MeterStyle=styleRightText
MeasureName=MeasureGold
X=200
Y=180
W=190
H=14
Text=%1 € / kg

[meterLabelSilver]
Meter=String
MeterStyle=styleLeftText
X=10
Y=200
W=190
H=14
Text=Silver

[meterValueSilver]
Meter=String
MeterStyle=styleRightText
MeasureName=MeasureSilver
X=200
Y=200
W=190
H=14
Text=%1 € / kg

#### Styles ####

[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=Left
; Meters using styleLeftText will be left-aligned.
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleRightText]
StringAlign=Right
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Capture problem

Post by jsmorley »

Try restarting Rainmeter.
PtitChat107
Posts: 126
Joined: December 31st, 2015, 6:40 pm

Re: Capture problem

Post by PtitChat107 »

I had to restart Rainmeter twice and clean the temporary files; everything works perfectly! :jawdrop Thank you ! :oops:
PtitChat107
Posts: 126
Joined: December 31st, 2015, 6:40 pm

Re: Capture problem

Post by PtitChat107 »

Jsmorley, I'm not sure that was the right solution; I wanted to reduce the refresh rate (10 sec) to be sure that it worked and after a while the results disappear and I find the following error in the logs: RegExp matching error (-1)
Edit.: I have just found the RainRegExp software and it seems that it does not find anything of what I am supposed to find, I will surely drop and find another site
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Capture problem

Post by jsmorley »

Vous avez atteint le quota de 10 pages pour une période de 30 jours pour cette rubrique. Si vous souhaitez en découvrir d'avantage, devenez Membre Gratuit en cliquant sur le bouton "Créer un compte".
In English, more or less:
You have reached the quota of 10 pages for a period of 30 days for this section. If you want to discover more, become a free member by clicking on the "Create an account" button.
This site is not going to work with WebParser, as you can't create and account and then "log in" with WebParser.
PtitChat107
Posts: 126
Joined: December 31st, 2015, 6:40 pm

Re: Capture problem

Post by PtitChat107 »

Thin I did not think about it, it's a shame !! I will complain about the website lol :uhuh:
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Capture problem

Post by jsmorley »

PtitChat107 wrote:Thin I did not think about it, it's a shame !! I will complain about the website lol :uhuh:
Their intent is to stop exactly what you are trying to do, to "screen scrape" the HTML with a process that lets you get the data without being exposed to whatever advertising generates the revenue they need. You can log in with a browser to a free account, and hit it as many times as you like, but if you are not logged in, if you are just getting and parsing the HTML without visiting the site in your browser, if they can't set a "cookie", they are going to severely limit that.
PtitChat107
Posts: 126
Joined: December 31st, 2015, 6:40 pm

Re: Capture problem

Post by PtitChat107 »

Exactly I have an account on the site but I did not think it was going to be a problem at this point, it's a shame that they do not also work with an API (and some limit of free requests per day of DarkSky.net) but I understand perfectly anyway