You are not logged in.

#3876 2020-10-14 19:33:06

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,413

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

I suspect we're getting severely trolled by weather.com...


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3877 2020-10-16 20:21:04

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,413

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

I'll be damned! It works on me as well.
So, from what we've got from all this up until now, is that weather.com is using the same pieces of alternating code all this time, am I correct?
If so, all these updates, all these (endless) months... Have I been chasing my tail?

@ceeslans
Which piece of il-harun's code did you add to the current script to make it work? Was it a piece of a previous version of the script?


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3878 2020-10-16 20:29:16

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,413

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

ANNOUNCEMENT:
Weather.com script updated by... il.harun and ceeslans, both of whom I'd like to thank for their great insight and instict.
When I was watching the trees and not the forest, they managed to see the whole picture and realise what's going on here.
S11 has been right all along: weather.com are changing their layout automatically every now and then according to some predefined templates which are alternating. Practically, it means that I write a script for a specific layout, then the layout is changed, then it appears again and I write a new script for this specific layout, cause it never occurred to me that they might be using something from the past. Even more practically, it means that I'm a moron...
Just pull the new script, which isn't actually new, but a collage from old ones.

Last edited by TeoBigusGeekus (2020-10-16 20:32:21)


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3879 2020-10-16 20:42:52

ceeslans
Member
Registered: 2015-09-30
Posts: 93

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

TeoBigusGeekus wrote:

I'll be damned! It works on me as well.
...
@ceeslans: Which piece of il-harun's code did you add to the current script to make it work? Was it a piece of a previous version of the script?

I downloaded the archive that il_harun offered in post #3872 and extracted the weather_com script. Then I ran that script, and found all details were correctly drawn from the weather.com server - except for the svg/png conversion.
As said, this was easily resolved by replacing conversion code (line 259-269 in il_harun's script) with the correct code (taken from from your latest script version)...

Last edited by ceeslans (2020-10-17 07:36:52)

Offline

#3880 2020-10-16 20:45:15

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,413

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

Alright, then, thanks.

@il.harun
Where did you find the code you've posted?
Was it an earlier version of the script?


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3881 2020-10-16 23:45:40

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,449

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

TeoBigusGeekus wrote:

ANNOUNCEMENT:
Even more practically, it means that I'm a moron...

ABSOLUTELY DISAGREE!

One person cannot see everything all the time.
Sometimes it takes fresh eyes to see through the smokescreen!

You are the Master Weatherman!
We all need a little help every now and then.

sudo apt install --no-install-recommends artha

and I'm closer than you are - hahahahahaha
moron.th.jpg
And there is actually a University of Moron as well!


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#3882 2020-10-17 06:06:20

loutch
Member
Registered: 2015-12-12
Posts: 442

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

Hello


Theo great job working good by me with new script

Capture-d-cran-2020-10-17-08-07-59.png


@+


Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 20.04 lts on ASUS Rog STRIX

Offline

#3883 2020-10-17 08:21:19

il.harun
Member
Registered: 2020-06-04
Posts: 11

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

Hi Teo
I am using Firefox to investigate an element (temperature, pressure ...)
Example temperature now:
<span data-testid="TemperatureValue" class="CurrentConditions--tempValue--3KcTQ">12°</span>
I look at your scripts, select the right one, run it, a small correction and everything works (or a large correction - 80% works, my level of programming is small)
--3KcTQ was recently _3KcTQ
I'm afraid to make a mistake, the penultimate version at the moment.
  Thank you for your work.

Upd.
correct weather_com Convert svgs to pngs in gitlab:
for i in $HOME/Weather_com_conky_script/Forecast_Images/*.svg
do
    fn=$(basename "$i")
    n=${fn%.*}
    convert -background none $HOME/Weather_com_conky_script/Forecast_Images/"$n".svg $HOME/Weather_com_conky_script/Forecast_Images/"$n".png
done

Last edited by il.harun (2020-10-17 10:01:19)

Offline

#3884 2020-10-17 18:18:48

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,413

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

Right I see.
That's exactly what they've been doing the last few months, changing a double dash to an underscore, an underscore to a single dash, etc.
It's getting ridiculous...
I must find a way to massively address to the issue; there's a bigger picture to be seen, I've yet to find it...

@S11
Thanks for the comforting words, you're always kind, but this is a humiliating turn of events: weather.com have outsmarted all of us, accuweather must be really jeallous.


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3885 2020-10-18 09:34:36

ohnonot
...again
Registered: 2015-09-29
Posts: 4,949
Website

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

TeoBigusGeekus wrote:

I must find a way to massively address to the issue; there's a bigger picture to be seen, I've yet to find it...

Hm.
I just had a look at weather.com. They don't provide easily downloadable weather data, and a general web search for "download weather data" doesn't lead anywhere (aside: these large weather sites are insanely ad-ridden, I wonder how anybody can enjoy the www of 2020 without advanced blocking).
But that doesn't mean this doesn't exist.
E.g. the xfce4-panel weather plugin uses yr.no which allows downloading their data straight to JSON format - CLI tools to parse JSON exist, e.g. jq or jshon.
I know there's a few more sites offering this. Some might require opening a free account. A search for "open weather data" - openweathermap.org seems to be the largest.

In case you must stay with weather.com's html page:

  • the current case is fairly simple - you should replace a search for "CurrentConditions--tempValue--3KcTQ" with a search for "CurrentConditions--tempValue*"

  • are you already using tools designed to parse HTML, e.g. xmlstarlet or xmllint? This gives you more power over selecting elements, e.g. things like "the 3rd <div> in the 2nd table" are possible in addition to things like "if class == CurrentConditions--tempValue*"


Search youtube without a brwoser: repo | thread
BL quote proposals to this thread please.
my repos / my repos

Offline

#3886 2020-10-18 10:22:34

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,413

Re: Conky weather+moon scripts (Accuw/WUndergr/Weather.com/NWS/MoonGiant)

Thanks for the proposals, I only use sed.
When I tried (in a previous version of the script) to search for CurrentConditions--tempValue, they changed it to CurrentConditions-tempValue or something. If you only search for CurrentConditions* you get something like 50 hits. They know what they're doing...
But I agree, I need to find some time and get the forest, not the trees. There must be a way to make a weather.com script to get all (or almost all) possible changes.


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

Board footer

Powered by FluxBB