You are not logged in.

#61 2026-11-11 14:42:05

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

Re: Conky Weather: MyForecast Script

@marens: thanks a lot for updating us on those script changes !

Offline

#62 2026-11-11 17:45:46

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 3,203

Re: Conky Weather: MyForecast Script

^I see "skyscrapers" in the clouds here. I have no idea where they came from...   big_smile
803597522_bildschirmfoto_2026-11-11_18-38-37.png

Offline

#63 2026-11-11 18:04:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,345

Re: Conky Weather: MyForecast Script

^ That is one of the fog icons (8.png, 9.png, 10.png, 12.png).

It’s similar here at the moment:

my-conky.png

Last edited by marens (2026-11-26 19:18:20)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#64 2026-11-11 18:33:55

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 3,203

Re: Conky Weather: MyForecast Script

^^Good to know! Thanks!  big_smile

Offline

#65 2026-11-12 06:26:33

asqwerth
Member
Registered: 2015-10-08
Posts: 89

Re: Conky Weather: MyForecast Script

Thanks for the script updates, @marens!

Offline

#66 2026-11-14 00:08:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,345

Re: Conky Weather: MyForecast Script

Changes within  #### NOW FORECAST

Bad weather sometimes helps to stay home and do something useful.
I made a couple of 'cosmetic' changes, nothing special.

Removed the line after  ## Wind Speed:

sed -i -e '/><\/i>/d' $HOME/MyForecast/now

The command for  ### Wind direction  is now more efficient and looks like this:

## Wind Direction
cat $HOME/MyForecast/weather_raw | grep -A 2 'Wind:' | sed -e 's/.* //' -e 's/<sup>//' -e 's/<\/sup>//' -e '/Wind:/d' -e '/fill/d' | sed -n '$p' >> $HOME/MyForecast/now

As I said, nothing special.
Please update the script.

mf-conky.png

Note *
I would like to remind you that daylight saving time has ended.
Make changes in mf-conky for the hourly forecast if you are not using the only correct solution:
https://forums.bunsenlabs.org/viewtopic … 56#p151756

P.S.
The myforecast script has been updated:
https://forums.bunsenlabs.org/viewtopic … 80#p150180

Last edited by marens (2026-11-14 00:22:40)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#67 2026-11-20 01:22:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,345

Re: Conky Weather: MyForecast Script

Daily and Hourly Temperature

As you know, I created the script for MyForecast in the middle of April (Spring).
It was expected that changes would occur when colder days arrived.

The MyForecast website uses "-0°" for temperature in the daily and hourly forecast.

mf-site.png

I don't like that way and the script has been changed.
The “-” sign is simply removed.

#### DAILY FORECAST

Replace:

## High Temerature
cat $HOME/MyForecast/weather_raw | grep -A 1 '<h2 class="roboto-condensed-700 me-2 primary-txt">' | sed -e 's/^[ \t]*//' -e '/--/d' -e '/class/d' -e 's/<\/h2>//' -e 's/ .*//' > $HOME/MyForecast/high_temp

## Low Temerature
cat $HOME/MyForecast/weather_raw | grep -A 1 '<h4 class="roboto-condensed-400 mt-lg-2 text-body-tertiary" style="margin-top:3px;">' | sed -e 's/^[ \t]*//' -e '/--/d' -e '/class/d' -e 's/<\/h4>//' -e 's/ .*//' > $HOME/MyForecast/low_temp

With:

## High Temerature
cat $HOME/MyForecast/weather_raw | grep -A 1 '<h2 class="roboto-condensed-700 me-2 primary-txt">' | sed -e 's/^[ \t]*//' -e '/--/d' -e '/class/d' -e 's/<\/h2>//' -e 's/ .*//' -e' s/-0/0/' > $HOME/MyForecast/high_temp

## Low Temerature
cat $HOME/MyForecast/weather_raw | grep -A 1 '<h4 class="roboto-condensed-400 mt-lg-2 text-body-tertiary" style="margin-top:3px;">' | sed -e 's/^[ \t]*//' -e '/--/d' -e '/class/d' -e 's/<\/h4>//' -e 's/ .*//' -e' s/-0/0/' > $HOME/MyForecast/low_temp

#### HOURLY FORECAST

Replace:

## Temperature
cat $HOME/MyForecast/hourly/hourly_raw | grep -A 1 '<th scope="row">' | grep '<td>'| sed -n '1,8p' | sed -e 's/^[ \t]*//' -e 's/<td>//' -e's/<\/td>//' > $HOME/MyForecast/hourly/temperature

With:

## Temperature
cat $HOME/MyForecast/hourly/hourly_raw | grep -A 1 '<th scope="row">' | grep '<td>'| sed -n '1,8p' | sed -e 's/^[ \t]*//' -e 's/<td>//' -e 's/<\/td>//' -e' s/-0/0/' > $HOME/MyForecast/hourly/temperature

Before:
daily1.png

After:
daily2.png

P.S.
The myforecast script has been updated:
https://forums.bunsenlabs.org/viewtopic … 80#p150180


If people would know how little brain is ruling the world, they would die of fear.

Offline

#68 2026-11-21 21:06:55

arof
Member
Registered: 2020-08-09
Posts: 9

Re: Conky Weather: MyForecast Script

Here is my variation of this script with 15 days forecast support.
This is what it looks like when used with conky htcspill:
htbQ5Vh.png.

Last edited by arof (2026-11-21 22:42:01)

Offline

#69 2026-11-21 22:54:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,345

Re: Conky Weather: MyForecast Script

^ It looks great.

I assume you're intentionally not using square weather icons in Conky?
A very interesting and creative approach.  smile

arof wrote:

Here is my variation of this script with 15 days forecast support. ...

Yes.
I wrote the script in a way that is understandable to most people.

Members of our forum are familiar with weather forecast scripts and have a lot of experience with them.

Last edited by marens (2026-11-22 00:43:36)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#70 2026-11-22 01:09:11

arof
Member
Registered: 2020-08-09
Posts: 9

Re: Conky Weather: MyForecast Script

marens wrote:

I assume you're intentionally not using square weather icons in Conky?

Of course. There’s no problem with changing that, after all.

Offline

#71 2026-11-22 13:58:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,345

Re: Conky Weather: MyForecast Script

Current/RealFeel Temperature

OK, it happened again.
The “-” sign appears before zero, including for the comfort level (RealFeel).

Website:
myforecat.png

Conky:
mf-conky1.png

I assume that it will be the same for the current temperature.
It is time to remove it.

Open myforecast script  >  section   #### NOW FORECAST.
That part should look like this:

## Temperature
cat $HOME/MyForecast/weather_raw | grep 'mt-2 primary-txt">' | awk -F'</' '{print $1}' | sed -e 's/<div class="display-2 roboto-condensed-700 m-lg-0 mt-2 primary-txt">//' -e 's/^[ \t]*//' -e "s/<span class='csuper'>//" -e 's/-0/0/' >> $HOME/MyForecast/now

## Comfort Level
cat $HOME/MyForecast/weather_raw | grep -A 2 'Comfort Level' | grep 'class' | sed -e 's/^[ \t]*//' -e 's/<p class="my-2">//' -e "s/<span class='csuper'>//" -e 's/<\/span><\/p>//' -e 's/-0/0/' >> $HOME/MyForecast/now

Done.

mf-conky2.png

P.S.
The myforecast script has been updated:
https://forums.bunsenlabs.org/viewtopic … 80#p150180

Last edited by marens (2026-11-22 14:05:40)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#72 Today 02:17:10

asqwerth
Member
Registered: 2015-10-08
Posts: 89

Re: Conky Weather: MyForecast Script

@marens

The latest script is generating empty text files as of this morning.  It was fine for me last night.

Offline

#73 Today 03:32:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,345

Re: Conky Weather: MyForecast Script

Addresses (Daily + Hourly) and Cookies

The MyForecast developers have changed the addresses again.
For Paris (France), the code now looks like this:

## Paris, France - NEW
address_daily="https://www.myforecast.com/?cwid=62827"

address_hourly="https://www.myforecast.com/hourly-forecast.php?cwid=62827"

Addresses must be in the same format as for ## Paris, France - NEW.

Here you have a detailed explanation (below the line: HOW?):
https://forums.bunsenlabs.org/viewtopic … 80#p150180

Unfortunately, that's not all.
The MyForecast developers have also changed the headers, so now, if you want metric values (°C instead of °F...), you must enable cookies in your browser.
I had to modify the curl commands.

Daily:

curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' --cookie 'metric=true' -s "$address_daily" > $HOME/MyForecast/weather_raw

Hourly:

curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' --cookie 'metric=true' -s "$address_hourly" > $HOME/MyForecast/hourly/hourly_raw

It seems that, for now, everything is working great again.
If everything goes well during testing tomorrow, I will update the myforecast script.

Enjoy.  smile

asqwerth wrote:

The latest script is generating empty text files as of this morning.  It was fine for me last night.

Thanks @asqwerth!


If people would know how little brain is ruling the world, they would die of fear.

Offline

#74 Today 15:06:21

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,345

Re: Conky Weather: MyForecast Script

^ Ok.

I checked once more.
The setting for metric values is related to Cookie.

Request Headers:

---
Cookie: PHPSESSID=5cqmrn9ht4623nr761facointc; metric=true; ...
---

Everything seems to be fine:

mf-conky.png

P.S.
The myforecast script has been updated:
https://forums.bunsenlabs.org/viewtopic … 80#p150180

Last edited by marens (Today 15:08:50)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#75 Today 15:45:22

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 3,203

Re: Conky Weather: MyForecast Script

^I'm sorry, but the script is still from April 2026...

819296243_bildschirmfoto_2026-12-02_16-40-58.png

Offline

#76 Today 16:02:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,345

Re: Conky Weather: MyForecast Script

^ At the end of the first post (#1) you have a fully updated myforecast script:
https://forums.bunsenlabs.org/viewtopic … 80#p150180


If people would know how little brain is ruling the world, they would die of fear.

Offline

#77 Today 16:21:24

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 3,203

Re: Conky Weather: MyForecast Script

^Ah, thank you. I hadn't gotten that far.  smile

Thanks!

Offline

#78 Today 16:50:09

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 3,203

Re: Conky Weather: MyForecast Script

all right  wink

819327782_bildschirmfoto_2026-12-02_17-44-47.png

Offline

#79 Today 18:48:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,345

Re: Conky Weather: MyForecast Script

No, it isn't.  smile
Your hourly forecast should show the NEXT three hours (18h, 19h, 20h).

The best and only correct way is to use my script:
https://forums.bunsenlabs.org/viewtopic … 56#p151756

Once you do this, it no longer matters whether daylight saving time is in effect, because a modified time format from the website is used.

text-editor.png

It is now easy to obtain the time format you use in Conky.

$ sed -n '1p' $HOME/MyForecast/hourly/time | sed 's/:00/h/'
20h

Or:

$ sed -n '1p' $HOME/MyForecast/hourly/time | sed 's/:00/ h/'
20 h

EDIT
Thanks for the feedback.
You have confirmed that the fully updated myforecast skript is working, including today's update.

A typo can always happen.  smile

Last edited by marens (Today 19:22:20)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#80 Today 21:09:06

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

Re: Conky Weather: MyForecast Script

thought I was losing my mind, and puzzled what caused all these errors messages...
@marens to the rescue... terima kasih banyak !

Offline

Board footer

Powered by FluxBB