It is currently April 20th, 2024, 2:25 pm

webparser not working

Get help with creating, editing & fixing problems with skins
blackjack550
Posts: 12
Joined: August 4th, 2021, 1:45 am

webparser not working

Post by blackjack550 »

i am a newbie. the skin for stock of china , it work is fine at yesterday.but now its not working
i test url: http://hq.sinajs.cn/list=s_sz300787 is ok
i got error from log:
DBUG (09:44:06.982) STOCK_CN\company\stock_lvmeng.ini - [InfoStock1]: Fetching: http://hq.sinajs.cn/list=s_sz300787
ERRO (09:44:07.008) STOCK_CN\company\stock_lvmeng.ini - [InfoStock1]: (Fetch error) 找不到元素。 (ErrorCode=1168)
i cant resolve it now pls help me.thx

Code: Select all


[Rainmeter]
Author=blackjack550
AppVersion=2000000
Update=1000

[Metadata]
Description=The stock for China.
License=
Version=1.0.0

[Variables]
fontName=Tahoma
textSize=9
colorText=255,255,255,205
colordown=0,255,0,205
colorup=255,0,0,205
update.Spd=15
Quote="http://hq.sinajs.cn/list=s_sz300787"

[InfoStock1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=#Quote#
RegExp="(?siU)var hq_str_(.*)="(.*),(.*),(.*),(.*),(.*),(.*)";"
CodePage=936
StringIndex=7
UpdateRate=#update.Spd#

[StockName]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[InfoStock1]
StringIndex=2

[PriceNow]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[InfoStock1]
StringIndex=3

[Change]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[InfoStock1]
StringIndex=4

[ChangeNet]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[InfoStock1]
StringIndex=5

[StockColorinfo]
Measure=Calc
Formula=Change
IfAboveValue=0
IfAboveAction=!Execute [!SetOption "LabelLastSale" "FontColor" "#colorup#"][!SetOption "LabelChange" "FontColor" "#colorup#"][!SetOption "LabelChangeNet" "FontColor" "#colorup#"][!SetOption "StockBar" "BarColor" "#colorup#"][!SetOption "StockBar" "Flip" "0"][!SetOption "LabelUpSymbols" "FontColor" "#colorup#"][!SetOption "LabelUpSymbols" "Text" "Ç"]

; ----------------------------------

[StyleStockName]
StringAlign=LEFT
StringCase=UPPER
StringStyle=BOLD
StringEffect=SHADOW
FontEffectColor=0,0,0,205
FontColor=#colorText#
FontFace=微软雅黑
FontSize=12
AntiAlias=1
ClipString=1

[StyleChange]
StringAlign=LEFT
StringCase=NONE
StringStyle=BOLD
StringEffect=SHADOW
;FontColor=#ColorStock#
FontEffectColor=0,0,0,205
FontFace=Swis721 Blk BT
FontSize=10
AntiAlias=1
ClipString=1

[styleBar]
BarOrientation=VERTICAL
SolidColor=255,255,255,5

[StyleDate]
StringAlign=LEFT
StringCase=NONE
StringStyle=BOLD
StringEffect=SHADOW
FontEffectColor=0,0,0,205
FontColor=255,255,255,205
FontFace=#fontName#
FontSize=7
AntiAlias=1
ClipString=1

[StyleSymbols]
StringAlign=LEFT
StringCase=NONE
StringStyle=BOLD
StringEffect=SHADOW
FontEffectColor=0,0,0,255
FontColor=195,195,195,205
FontFace=Wingdings 3
FontSize=14
AntiAlias=1
ClipString=1

; ----------------------------------
; METERS display images, text, bars, etc.
; ----------------------------------

[meterBackground]
Meter=IMAGE
X=0
Y=0
W=145
H=90
SolidColor=0,128,255,180
SolidColor2=0,64,128,150

[Symbols]
Meter=STRING
MeterStyle=StyleSymbols
text="P"
X=5
Y=55
W=50
H=30
;LeftMouseDownAction=!ActivateConfig "STOCK_CN" "stock_sh.ini"

[LabelStockName]
Meter=STRING
MeterStyle=StyleStockName
MeasureName=StockName
X=1
Y=10
W=80
H=50

[LabelLastSale]
Meter=STRING
MeterStyle=StyleStockName
MeasureName=PriceNow
X=30
Y=52
W=100
H=38
FontSize=15
FontColor=#colordown#
FontFace=Swis721 Blk BT
NumOfDecimals=2

[LabelChange]
Meter=STRING
MeterStyle=StyleChange
MeasureName=Change
X=20
Y=35
W=60
H=75
FontColor=#colordown#
NumOfDecimals=2

[LabelChangeNet]
Meter=STRING
MeterStyle=StyleChange
MeasureName=ChangeNet
X=70
Y=35
W=65
H=60
FontColor=#colordown#
NumOfDecimals=2
Text="%1%"

[StockBar]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureChange
X=55
Y=10
W=5
H=40
BarColor=#colordown#
Flip=1

[LabelUpSymbols]
Meter=STRING
MeterStyle=StyleSymbols
X=80
Y=10
W=60
H=75
Text="È"
FontSize=14
FontColor=#colordown#
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: webparser not working

Post by death.crafter »

blackjack550 wrote: August 4th, 2021, 1:55 am i am a newbie. the skin for stock of china , it work is fine at yesterday.but now its not working
i test url: http://hq.sinajs.cn/list=s_sz300787 is ok
i got error from log:
DBUG (09:44:06.982) STOCK_CN\company\stock_lvmeng.ini - [InfoStock1]: Fetching: http://hq.sinajs.cn/list=s_sz300787
ERRO (09:44:07.008) STOCK_CN\company\stock_lvmeng.ini - [InfoStock1]: (Fetch error) 找不到元素。 (ErrorCode=1168)
i cant resolve it now pls help me.thx
You oughta use Measure=WebParser but it works fine for me:
Screenshot 2021-08-04 105443.png
I am guessin you are editing an old skin. Just geet rid of the !Execute. It will work fine without them.
You do not have the required permissions to view the files attached to this post.
from the Realm of Death
blackjack550
Posts: 12
Joined: August 4th, 2021, 1:45 am

Re: webparser not working

Post by blackjack550 »

thx for reply,i resolve the problem,but i dont know why fetch error.
i reboot my computer, i guess it may be network something wrong because i usually dail the vpn.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: webparser not working

Post by death.crafter »

blackjack550 wrote: August 4th, 2021, 5:50 am thx for reply,i resolve the problem,but i dont know why fetch error.
i reboot my computer, i guess it may be network something wrong because i usually dail the vpn.
May be you have blocked Rainmeter in Firewall or something. Try going to the said website in your browser. If it opens then Rainmeter should fetch properly. But be sure to check firewall settings.
from the Realm of Death
User avatar
balala
Rainmeter Sage
Posts: 16148
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: webparser not working

Post by balala »

Just an idea, not sure this is the case, however note that skins using WebParser measures if are refreshed repeatedly and in short order, might stop working. This is a known issue and there is only way to fix it: a restart of Rainmeter. I suppose this has happened in this case as well, the skins hanged and this has been kept until the computer has been restarted, which fixed the issue. Should have been enough a complete restart of Rainmeter, wouldn't have been needed a restart of the computer as well, however restarting the computer has fixed the issue.
Not sure I am right however. You can find some details here.
blackjack550
Posts: 12
Joined: August 4th, 2021, 1:45 am

Re: webparser not working

Post by blackjack550 »

death.crafter wrote: August 4th, 2021, 9:26 am May be you have blocked Rainmeter in Firewall or something. Try going to the said website in your browser. If it opens then Rainmeter should fetch properly. But be sure to check firewall settings.
i check my firewall configure,and closed it.but i still got error.
thx your advice
blackjack550
Posts: 12
Joined: August 4th, 2021, 1:45 am

Re: webparser not working

Post by blackjack550 »

balala wrote: August 4th, 2021, 7:26 pm Just an idea, not sure this is the case, however note that skins using WebParser measures if are refreshed repeatedly and in short order, might stop working. This is a known issue and there is only way to fix it: a restart of Rainmeter. I suppose this has happened in this case as well, the skins hanged and this has been kept until the computer has been restarted, which fixed the issue. Should have been enough a complete restart of Rainmeter, wouldn't have been needed a restart of the computer as well, however restarting the computer has fixed the issue.
Not sure I am right however. You can find some details here.
i test some thing:
1.network, but i can got correct information by api url from my chrome browser in same computer
2.firewall, i closed it but no some thing happened.
3.test webparser.dll ,i try to run code from internet.webparser not working.
4.find webparser.dll, i cant find webparser.dll in Plugins/,(btw,it's working now ,i still cant find this file now)
5.close rainmeter application, it's not working.i remove skin and reload the skin is not valid.
and then i reboot my computer, it is recovered.
User avatar
balala
Rainmeter Sage
Posts: 16148
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: webparser not working

Post by balala »

blackjack550 wrote: August 5th, 2021, 7:20 am 3.test webparser.dll ,i try to run code from internet.webparser not working.
Doesn't make sense (at least not for me). What run code from internet.webparser does mean?
blackjack550 wrote: August 5th, 2021, 7:20 am 4.find webparser.dll, i cant find webparser.dll in Plugins/,(btw,it's working now ,i still cant find this file now)
There is no WebParser.dll plugin file, because at the beginning of 2018, WebParser became an internal measure (as of Rainmeter 4.0). It has no .dll file anymore.
But one more question still persist: where have you tried looking for the WebParser.dll file? As said, you anyway couldn't find it, but I1m just curious where have you tried finding it?
blackjack550 wrote: August 5th, 2021, 7:20 am 5.close rainmeter application, it's not working.i remove skin and reload the skin is not valid.
and then i reboot my computer, it is recovered.
If you close Rainmeter it doesn't even have to.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: webparser not working

Post by death.crafter »

balala wrote: August 5th, 2021, 7:52 am Doesn't make sense (at least not for me). What run code from internet.webparser does mean?
I think it is a punctuation.

Use the URL in browser, then in Webparser. Webparser not working.
from the Realm of Death
User avatar
balala
Rainmeter Sage
Posts: 16148
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: webparser not working

Post by balala »

death.crafter wrote: August 5th, 2021, 7:59 am I think it is a punctuation.

Use the URL in browser, then in Webparser. Webparser not working.
:Whistle
Alright, probably you are right. However I still can't really follow blackjack550.