It is currently March 29th, 2024, 1:52 pm

Question

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Question

Post by balala »

xenium wrote: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" :???:
I didn't check in the moment when you posted you reply, but right now they are again the same: 17 both place: in the source code and on the site.
Also the Updated moments are the same: Sunday 9:00.
Please copy and post here the code of the website (using the tags), and also indicate what value do you see in your browser.
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: Question

Post by xenium »

balala wrote:I didn't check in the moment when you posted you reply, but right now they are again the same: 17 both place: in the source code and on the site.
Also the Updated moments are the same: Sunday 9:00.
I saw that at one point and on the website and in the source code the data was the same (after about eight hours).
Now look different again but to say it has not been updated yet((20 and update sunday 10 on the website, and in source code 17 and update sunday 9)
balala wrote:Please copy and post here the code of the website (using the tags), and also indicate what value do you see in your browser.
The source code is very, very, very big...
I attach a new link and printscreen with the data on the website and the source code
http://aqicn.org/city/tokyo/

on the website
Capture.PNG
in the source code ( 85 and sunday 20)
Capture2.PNG
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Question

Post by balala »

xenium wrote:I saw that at one point and on the website and in the source code the data was the same (after about eight hours).
Now look different again but to say it has not been updated yet((20 and update sunday 10 on the website, and in source code 17 and update sunday 9)

The source code is very, very, very big...
I attach a new link and printscreen with the data on the website and the source code
http://aqicn.org/city/tokyo/

on the website
Capture.PNG
in the source code ( 85 and sunday 20)
Capture2.PNG
I'd need the source code, not a screenshot. It doesn't help at all. I know the code is large enough, but if you can't post it, save it in a .txt file and attach that one.
However, take care to refresh the website in your browser, each time you're checking what you see on the site and copy the source code.
But maybe there is one more thing to take into account. A while ago we've tried to download an image from this (or a similar) site and finally fonpaolo concluded that the site uses some java scripts and that's why the image doesn't even have a real URL, to can download it with WebParser measures. Maybe something similar is going on here, too. Depending on (for me unknown) some facts, the shown numeric value can be different (obviously not always, but at least sometimes) from that existing in the source code and the difference being given by a running java script. If this is true, there is no way to make the skin to read and show the value you have on the website. Again: maybe I am wrong, but this can be an explanation.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Question

Post by fonpaolo »

I can confirm, the section has a "script" at the beginning, I suspect what you download is some sort of "cached" data...
Maybe someone can be more accurate, I just gave a quick look.
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: Question

Post by xenium »

balala wrote:I'd need the source code, not a screenshot. It doesn't help at all. I know the code is large enough, but if you can't post it, save it in a .txt file and attach that one.
However, take care to refresh the website in your browser, each time you're checking what you see on the site and copy the source code.
But maybe there is one more thing to take into account. A while ago we've tried to download an image from this (or a similar) site and finally fonpaolo concluded that the site uses some java scripts and that's why the image doesn't even have a real URL, to can download it with WebParser measures. Maybe something similar is going on here, too. Depending on (for me unknown) some facts, the shown numeric value can be different (obviously not always, but at least sometimes) from that existing in the source code and the difference being given by a running java script. If this is true, there is no way to make the skin to read and show the value you have on the website. Again: maybe I am wrong, but this can be an explanation.
on the web page is displayed, 68 with monday 5:00
in source code is displayed, 63 with monday 2:00
Source code.zip
You do not have the required permissions to view the files attached to this post.
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: Question

Post by xenium »

I would like to check one more thing.
When I posted the code to the skin you said
balala wrote:but for now what is shown on the website and what is in the html code are the same
though, on my system, different dates were displayed.
I want to see if the problem does not appear, only on my system
Please check if the skin below shows different data on the website and skin
I hope the source code does not update too soon
TestSourceCode.zip
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Question

Post by balala »

xenium wrote:I would like to check one more thing.
When I posted the code to the skin you said

though, on my system, different dates were displayed.
I want to see if the problem does not appear, only on my system
Please check if the skin below shows different data on the website and skin
I hope the source code does not update too soon
TestSourceCode.zip
Right now the shown value is different, the time is also different, than those existing in the source code.
Probably we had right, as fonpaolo confirmed, there is a running script, which makes the difference. Especially that when I reload the site, the value existing in the source code appears for a moment, then it changes to another one. Probably (I suppose), when the script is run and it returns the difference, on the site the shown value is changing.
If this is right, probably there is no way to get the shown value.
User avatar
xenium
Posts: 841
Joined: January 4th, 2018, 9:52 pm

Re: Question

Post by xenium »

balala wrote:Right now the shown value is different, the time is also different, than those existing in the source code.
Probably we had right, as fonpaolo confirmed, there is a running script, which makes the difference. Especially that when I reload the site, the value existing in the source code appears for a moment, then it changes to another one. Probably (I suppose), when the script is run and it returns the difference, on the site the shown value is changing.
If this is right, probably there is no way to get the shown value.
Damn it ! :17angry
and how I worked on this skin .......
Anyway, thanks for your time!
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Question

Post by fonpaolo »

I think we need to add a few lines of explanation, here in the forum, probably in Tips & Tricks or directly in the WebParser documentation:

Be aware that, before creating a skin using WebParser and trying to use a web page as source, you'd better take a deep look at the source code of the web page.
- If you're using Chrome, use Ctrl+Shift+I or right click and select the last item at the bottom of the menu;
- If you're using Internet Explorer, use F12;
Then.

If the text, image or anything you're planning to use in your skin doesn't appear as plain text and isn't directly accessible (like using right click on an image, will be redirected to another link) and/or the section where it is what you want use starts with something like "readscript", "script", "javascript" and so on, you'll end up with a lot of wasted time and consequently disappointment.

Also remember that when you use a web page as a source, it's also risky because it can frequently change the page layout and you need to update your code every time.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Question

Post by balala »

fonpaolo wrote:I think we need to add a few lines of explanation, here in the forum, probably in Tips & Tricks or directly in the WebParser documentation:
Yep, but here the problem is that the needed value is available through the source code of the page, but it seems to be altered by script(s). In such cases it would very difficult to decide before the skin is created, how will it work.