Hello,
How can I extract the information in "Lunar data for the selected location" from this website to use in my skin ?
Or what is the best way to get this informations ?
Every help is welcome.
Edit: website HTML syntax (Not the url)
It is currently March 29th, 2024, 3:10 pm
MoonCalc Infos
-
- Posts: 75
- Joined: December 15th, 2018, 3:35 am
MoonCalc Infos
Last edited by GTI.H on February 28th, 2019, 4:30 pm, edited 4 times in total.
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: MoonCalc Infos
Probably you can't, because it seems the site uses some java scripts to show up all the information. But anyway I'd recommend not to use a such site as source, a xml would be much better. All those information are available on the weather.com as well and this one has the advantage that there are a lot of skins on both, the Share Your Creations section of this forum and on DeviantArt.com, which can be used to parse all those data.
There is one more possibility. Many of those information can be calculated locally as well, without having to use WebParser measures to download them. For example: https://forum.rainmeter.net/viewtopic.php?f=27&t=24740&p=130794&hilit=sunmoon#p130759. This skin I wrote more than two years ago, uses a small .lua script file (and another one to the calculations related to the Sun), to make locally all calculations. It can calculate the moment of Moon/Sun rise/set, using the local geographical coordinates, which have to be added as variables.
-
- Posts: 75
- Joined: December 15th, 2018, 3:35 am
Re: MoonCalc Infos
Hi balala,
Thanks for the reply!
The information I most need now is "Moon Azimuth" and the informations for location of the moon in the sky:
"Moon Rise, Moon Set, Moon Distance, Moon Altitude, Moon Azimuth"
I do not know a Skin that has this information I need, do you know it?
Thanks for the reply!
Yes, I know that with xml is feasible, but where do I get the xml of this website?
When I looked, I did not see "Moon Rise, Moon Set, Moon Distance, Moon Altitude, Moon Azimuth" on xml weather.com, could you show me?
I have a lua script (SUNCALC.LUA / raiguard / v1.0.5), but I try to avoid the use of scripts to the maximum.balala wrote: ↑February 26th, 2019, 8:02 am There is one more possibility. Many of those information can be calculated locally as well, without having to use WebParser measures to download them. For example: https://forum.rainmeter.net/viewtopic.php?f=27&t=24740&p=130794&hilit=sunmoon#p130759. This skin I wrote more than two years ago, uses a small .lua script file (and another one to the calculations related to the Sun), to make locally all calculations. It can calculate the moment of Moon/Sun rise/set, using the local geographical coordinates, which have to be added as variables.
The information I most need now is "Moon Azimuth" and the informations for location of the moon in the sky:
"Moon Rise, Moon Set, Moon Distance, Moon Altitude, Moon Azimuth"
I do not know a Skin that has this information I need, do you know it?
-
- Posts: 75
- Joined: December 15th, 2018, 3:35 am
Re: MoonCalc Infos
I noticed that the informations is in HTML, would not it be possible to extract it from HTML?
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
Re: MoonCalc Infos
Probably nowhere on that site, but I'm not sure. You have to find it if there is any.
Unfortunately those are not there. Just the Sunrise and Sunset, but no the Moonrise and Moonset. My mistake, sorry...
Why? They are working good, no problems with them.
The Moonrise, Moonset and the distance are available in my SunMoon skin, along with the current phase, illumination, elongation, age and the number of days until new moon, full moon and so on. Have you tried it out?
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: MoonCalc Infos
You will not be able to parse that site.
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
<hr>
<address>Apache Server at default-2001_8d8_9a0_8800__23_cdd1 Port 443</address>
</body></html>
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: MoonCalc Infos
Besides jsmorley's reply, I don't know how have you got that source code, because I get just this:
Code: Select all
<span style="white-space: nowrap;" id="clickSunrise" class="time-span sunrise sunrise-time">...</span></td>
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: MoonCalc Infos
The debug tools in your browser are a different animal than just the raw source code on the site.balala wrote: ↑February 26th, 2019, 6:31 pm Besides jsmorley's reply, I don't know how have you got that source code, because I get just this:As you can see there is no data. Searching through the whole content of the source code, I can't find the hour shown in the browser. So, how have you got the image?Code: Select all
<span style="white-space: nowrap;" id="clickSunrise" class="time-span sunrise sunrise-time">...</span></td>
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: MoonCalc Infos
WebParser simply connects to a resource and "downloads" whatever is presented when the resource is connected to. That is going to be the raw source text from any web site, presumably, but not necessarily, HTML. If the site in any way uses server-side or client-side Javascript, that script is NOT "executed" by WebParser. It's not a web browser. It doesn't understand HTML tags, Javascript commands, or anything else. What is downloaded and parsed is the TEXT that the site presents when it is accessed.
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: MoonCalc Infos
Ok, just to be short enough, I think the information needed by GTI.H can't be accessed by WebParser measures, right? This was my first tip, inmy first reply of this topic, as well.