I want to make a very basic skin that shows one number that gets updated every hour on a website.
The web address is
https://www.airkorea.or.kr/realSearch24
It shows the air quality index for my area.
(Sorry about the site being in Korean)
On the chart, the first row that is white (right below the gray shaded cells) and the fourth column shows a two digit number, in my case '66' at the moment (may be different depending on area and time). That single cell is what I want to display on my desktop, just in plain white font.
Any help?
It is currently April 28th, 2024, 2:19 am
I want to make a super simple skin showing one number from a webpage
-
- Posts: 3
- Joined: July 14th, 2018, 6:51 am
-
- Posts: 826
- Joined: November 20th, 2012, 11:58 pm
Re: I want to make a super simple skin showing one number from a webpage
Webparser is a basic start.
Have a look a that page in the rainmeter manual.
Have a look a that page in the rainmeter manual.
-
- Posts: 826
- Joined: November 20th, 2012, 11:58 pm
Re: I want to make a super simple skin showing one number from a webpage
I have investigated that site and unfortunately the table is created by a script, so the information contained in it can not be captured with webparser.
-
- Posts: 3
- Joined: July 14th, 2018, 6:51 am
Re: I want to make a super simple skin showing one number from a webpage
First of all, thanks a lot for taking your time to look into the site for me.FreeRaider wrote:I have investigated that site and unfortunately the table is created by a script, so the information contained in it can not be captured with webparser.
And may I shamelessly ask you if this site
http://aqicn.org/city/seoul/
is possible for webparser?
All I want is that big number on my desktop.
Of course, I want it in a format of my own... (e.g. smaller font, different color, etc..)
But the main thing is having that number on my desktop.
Please! Teach me your way!
-
- Posts: 826
- Joined: November 20th, 2012, 11:58 pm
Re: I want to make a super simple skin showing one number from a webpage
Yes, it is possible for webparser capture info from that site. In the forum there is an addon RainRegExp - Rainmeter Regular Expression tester used for this "investigation".libykim wrote:And may I shamelessly ask you if this site
http://aqicn.org/city/seoul/
is possible for webparser?
Now... for your knowledge, you could try to make a skin ... and if you have problems I (we) would be happy to help you.
Otherwise you can refer to the following skin and modify it as you wish
-
- Rainmeter Sage
- Posts: 16182
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: I want to make a super simple skin showing one number from a webpage
EDIT: Sorry FreeRaider, you beat me. Again...
Starting from there, the following very simple WebParser measure will acquire and the attached String meter will show up the needed data:
When I tested the above code, just to make sure everything is all right, I used the URL for Beijing, too. I commented it out, but leaved there. You can try it out.
Obviously the String meter for example can be easily altered, giving it another color, size or whatever. But first please test this code to see if it works as you want and later we'll do the needed adjustments if you want.
Yes, this is possible and this question had been discussed previously, for example in this thread: https://forum.rainmeter.net/viewtopic.php?f=5&t=28161libykim wrote:And may I shamelessly ask you if this site
http://aqicn.org/city/seoul/
is possible for webparser?
All I want is that big number on my desktop.
Of course, I want it in a format of my own... (e.g. smaller font, different color, etc..)
But the main thing is having that number on my desktop.
Starting from there, the following very simple WebParser measure will acquire and the attached String meter will show up the needed data:
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
[Variables]
URL=http://aqicn.org/city/seoul/
;URL=http://aqicn.org/city/beijing/
[MeasureAir]
Measure=WebParser
UpdateRate=900
Url=#URL#
RegExp=(?siU)<td id='.*' class='.*' style='.*' align=center>(.*)</td>
StringIndex=1
[MeterAir]
Meter=STRING
MeasureName=MeasureAir
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=%1
Obviously the String meter for example can be easily altered, giving it another color, size or whatever. But first please test this code to see if it works as you want and later we'll do the needed adjustments if you want.
-
- Posts: 3
- Joined: July 14th, 2018, 6:51 am
Re: I want to make a super simple skin showing one number from a webpage
Okay, I'm going to try the RainRegExp and see what I can make out of it.
And if I am still lost, I'll look deeper into both of your codes.
Despite FreeRaider's good intention of not spoiling the learning for me, I did glance over both of your codes already.
But no worries, it was a really rough glance to see whether the RegExp was the same or not (which wasn't, and I'll have to figure that out as well), and even if I did look really hard at it I wouldn't understand it as I am a total noob :P
Anyway, I'll come back with what I've learned and managed to create. Thanks!
And if I am still lost, I'll look deeper into both of your codes.
Despite FreeRaider's good intention of not spoiling the learning for me, I did glance over both of your codes already.
But no worries, it was a really rough glance to see whether the RegExp was the same or not (which wasn't, and I'll have to figure that out as well), and even if I did look really hard at it I wouldn't understand it as I am a total noob :P
Anyway, I'll come back with what I've learned and managed to create. Thanks!
-
- Rainmeter Sage
- Posts: 16182
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: I want to make a super simple skin showing one number from a webpage
Very rarely are in two different codes of two different persons. RainRegExp can be indeed a good start to work with creating the proper RegExp options.libykim wrote:But no worries, it was a really rough glance to see whether the RegExp was the same or not (which wasn't, and I'll have to figure that out as well), and even if I did look really hard at it I wouldn't understand it as I am a total noob :P