Which is the reason that the source code of a web page is being updated with a very long delay(three, four hours ,sometimes and more), although the data on the web page is updated every hour?
Therefore, the skin can not display the correct data.
It is currently March 29th, 2024, 5:09 am
Question
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Question
As expressed, that is literally not possible. What is displayed on a web page in your browser IS what is there in the "source" of the web page.xenium wrote:Which is the reason that the source code of a web page is being updated with a very long delay(three, four hours ,sometimes and more), although the data on the web page is updated every hour?
Therefore, the skin can not display the correct data.
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
Re: Question
If you're talking about WebParser and UpdateRate, it depends on how often the site is updated, in most cases one hour or more is normal.
Depending on this, you can set the update accordingly, I'm using 10 minutes or less just for some forums (only the very active ones).
Depending on this, you can set the update accordingly, I'm using 10 minutes or less just for some forums (only the very active ones).
-
- Posts: 841
- Joined: January 4th, 2018, 9:52 pm
Re: Question
And yet it happensjsmorley wrote:As expressed, that is literally not possible. What is displayed on a web page in your browser IS what is there in the "source" of the web page.
On the web page In the source code
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
-
- Posts: 841
- Joined: January 4th, 2018, 9:52 pm
Re: Question
balala wrote:Could you give us the code of the skin (along with the URL), to can check?
Code: Select all
[Rainmeter]
Update=1000
[Variables]
UpdateRateSeconds=600
FontFace=arial
URL=http://aqicn.org/city/vancouver/
============================================================
[MeasureValue]
Measure=WebParser
Url=#URL#
RegExp=(?siU)<div class='aqivalue' id='aqiwgtvalue' style=' .* 'title=".*" >(.*)</div>
UpdateRate=#UpdateRateSeconds#
StringIndex=1
[MeasureLevel]
Measure=WebParser
Url=#URL#
RegExp=(?siU)<div class='aqivalue' id='aqiwgtvalue' style=' .* 'title="(.*)" >.*</div>
UpdateRate=#UpdateRateSeconds#
StringIndex=1
[MeasureUpdate]
Measure=WebParser
Url=#URL#
RegExp=(?siU)<span id='aqiwgtutime' val='.*'>(.*)</span>
UpdateRate=#UpdateRateSeconds#
StringIndex=1
==============================================================================================
[MeterValue]
Meter=String
MeasureName=MeasureValue
X=205
Y=272
W=270
H=50
FontColor=255,255,255,255
StringStyle=Normal
StringEffect=SHADOW
FontFace=arial
StringAlign=centercenter
FontEffectColor=0,0,0,80
AntiAlias=1
ClipString=1
FontSize=30
DynamicVariables=1
[MeterLevel]
Meter=String
MeasureName=MeasureLevel
X=205
Y=302
W=270
H=50
FontColor=250,250,250,250
StringStyle=Normal
StringEffect=SHADOW
FontFace=arial
StringAlign=centercenter
FontEffectColor=0,0,0,80
AntiAlias=1
ClipString=1
FontSize=12
[MeterUpdateTime]
Meter=String
MeasureName=MeasureUpdate
X=205
Y=322
W=270
H=50
FontColor=250,250,250,250
StringStyle=Normal
StringEffect=SHADOW
FontFace=arial
StringAlign=centercenter
FontEffectColor=0,0,0,80
AntiAlias=1
ClipString=1
FontSize=10
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Question
I'll try to follow what's going on, but for now what is shown on the website and what is in the html code are the same. Let's see how this will change in the near future.
-
- Posts: 841
- Joined: January 4th, 2018, 9:52 pm
Re: Question
To me on the website, is displayed "13" and "Updated on Sunday 7:00" and in source code "45" and "Updated on Saturday 23:00"balala wrote: for now what is shown on the website and what is in the html code are the same
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
Re: Question
This is my first suggestion: why do you use three measures to download all the informations?
Use a measure to download everything you need, then parse the needed strings with other measures using the downloaded information by the first measure.
Use a measure to download everything you need, then parse the needed strings with other measures using the downloaded information by the first measure.
-
- Posts: 841
- Joined: January 4th, 2018, 9:52 pm
Re: Question
This is just part of the code to illustrate the problemfonpaolo wrote:This is my first suggestion: why do you use three measures to download all the informations?
Use a measure to download everything you need, then parse the needed strings with other measures using the downloaded information by the first measure.
The main code uses the parent-child measure structure of the WebParser measures