You are not logged in.

#1 2026-04-02 23:34:20

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

Accuweather Conky Script

It's been a little over a month since my last accuweather script fix:
https://forums.bunsenlabs.org/viewtopic … 01#p149001

Then three weeks ago, AccuWeather developers changed the server settings and we got 'You don't have permission to access ...':

<HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD><BODY>
<H1>Access Denied</H1>
 
You don't have permission to access ...

If you ask me WHY, I don't know, but I can guess.

The script ended up on a large forum, and then on an even larger one.
It's foolish to think that Accuweather developers didn't notice the increased number of server requests.

I repeat, that's my assumption.

Finally, the  daily_forecast  and  hourly_forecast  sections were changed last night.

I realized I was at a crossroads.

After 38 months of maintaining the accuweather  script, maybe I should give up, as I've already announced.
My desire was not to be a member of large forums, but to help this small community preserve @TBG's work.
Otherwise, I wouldn't be here now, but there.

Of course, you can still share my code on other forums, but now you know a little more about what can happen.

The next post might be my last about the  accuweather  script.
It's pointless to fix the script several times a month.


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

Offline

#2 2026-04-02 23:46:40

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

Re: Accuweather Conky Script

Accuweather Conky Script

Please make a copy of your existing accuweather script first.

SERVER HEADERS

Current Forecast

Replace:

       curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -H 'access-control-allow-origin: *' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Connection: keep-alive' -H 'Sec-GPC: 1' -H 'Upgrade-Insecure-Requests: 1' -H 'Cache-Control: max-age=0' -o $HOME/Accuweather_conky_script/curr_cond_raw "$curr_addr"

with:

	curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:147.0) Gecko/20100101 Firefox/147.0' -H 'access-control-allow-origin: *' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.9' --compressed -H 'Connection: keep-alive' -H 'Sec-GPC: 1' -H 'Upgrade-Insecure-Requests: 1' -H 'Cache-Control: max-age=0' -o $HOME/Accuweather_conky_script/curr_cond_raw "$curr_addr"

Daily Forecast

Replace:

       curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -H 'access-control-allow-origin: *' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Connection: keep-alive' -H 'Sec-GPC: 1' -H 'Upgrade-Insecure-Requests: 1' -H 'Cache-Control: max-age=0' -o $HOME/Accuweather_conky_script/daily_forecast_raw "$daily_addr"

with:

	curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:147.0) Gecko/20100101 Firefox/147.0' -H 'access-control-allow-origin: *' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.9' --compressed -H 'Connection: keep-alive' -H 'Sec-GPC: 1' -H 'Upgrade-Insecure-Requests: 1' -H 'Cache-Control: max-age=0' -o $HOME/Accuweather_conky_script/daily_forecast_raw "$daily_addr"

Hourly Forecast

Replace:

       curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -H 'access-control-allow-origin: *' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Cache-Control: max-age=0' -o $HOME/Accuweather_conky_script/hourly_raw1 "$hourly_addr1"

with:

	curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:147.0) Gecko/20100101 Firefox/147.0' -H 'access-control-allow-origin: *' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.9' --compressed -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Cache-Control: max-age=0' -o $HOME/Accuweather_conky_script/hourly_raw1 "$hourly_addr1"

Replace:

       curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -H 'access-control-allow-origin: *' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Cache-Control: max-age=0' -o $HOME/Accuweather_conky_script/hourly_raw2 "$hourly_addr2"

with:

	curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:147.0) Gecko/20100101 Firefox/147.0' -H 'access-control-allow-origin: *' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.9' --compressed -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Cache-Control: max-age=0' -o $HOME/Accuweather_conky_script/hourly_raw2 "$hourly_addr2"

DAILY FORECAST

Replace:

       daily_addr="$(echo $address|sed 's/weather-forecast.*$//')"daily-weather-forecast/"$last_number"

with:

#       daily_addr="$(echo $address|sed 's/weather-forecast.*$//')"daily-weather-forecast/"$last_number"
       daily_addr="$(echo $address|sed 's/weather-forecast.*$//')"10-day-weather-forecast/"$last_number"

Replace:

				if [[ $forecast2015 == 1 ]]; then
					cp $HOME/Accuweather_conky_script/Forecast_Images_2015/$(sed -n ${i}p $HOME/Accuweather_conky_script/daily_forecast).png $HOME/Accuweather_conky_script/forecast_2015/forecast_$j.png
				fi
				if [[ $forecast2016 == 1 ]]; then
					cp $HOME/Accuweather_conky_script/Forecast_Images_2016/$(sed -n ${i}p $HOME/Accuweather_conky_script/daily_forecast).png $HOME/Accuweather_conky_script/forecast_2016/forecast_$j.png

with:

				if [[ $forecast2015 == 1 ]]; then
					cp $HOME/Accuweather_conky_script/Forecast_Images_2015/$(sed -n ${i}p $HOME/Accuweather_conky_script/daily_forecast | sed 's/^0*//').png $HOME/Accuweather_conky_script/forecast_2015/forecast_$j.png
				fi
				if [[ $forecast2016 == 1 ]]; then
					cp $HOME/Accuweather_conky_script/Forecast_Images_2016/$(sed -n ${i}p $HOME/Accuweather_conky_script/daily_forecast | sed 's/^0*//').png $HOME/Accuweather_conky_script/forecast_2016/forecast_$j.png

MARENS HOURLY

Part #Icons should now look like this

#Icons
        cat $HOME/Accuweather_conky_script/hourly | grep -o '[ ^]src="/images/weathericons/v2a/[^"]*' | awk -F'v2a/' '{print $2}' | sed 's/^0*//' | sed 's/.svg//' > $HOME/Accuweather_conky_script/marens_hourly/icons

WEATHER FONT

I've never used the accuweather script weather font, but I haven't forgotten those who like it.
I guess you need to replace the beginning of #function: test_image:

#function: test_image
test_image () {
    case $1 in
         1)
           echo a
         ;;
         2|3)
           echo b
         ;;
         4|5)
           echo c
         ;;
         6)
           echo d
         ;;
         7)
           echo e
         ;;
         8)
           echo f
         ;;

with:

#function: test_image
test_image () {
    case $1 in
         1|01)
           echo a
         ;;
         2|02|3|03)
           echo b
         ;;
         4|04|5|05)
           echo c
         ;;
         6|06)
           echo d
         ;;
         7|07)
           echo e
         ;;
         8|08)
           echo f
         ;;

accuweather.png  accuweather-moon.png


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

Offline

#3 Yesterday 10:09:49

ector1935
Member
Registered: 2017-05-03
Posts: 241

Re: Accuweather Conky Script

Hello, thank you for continuing the work of teo, I hope you continue to maintain the script, I have been using this weather for at least 5.6 years, if not more.

PS) If I were able to keep it I would do it but I'm not able to script
Ector

Edit
@Marens I wanted to ask you if you want to, if you posted an already modified accuweather, for the incapable like you I would be grateful, also because if I copy paste in the search in accuweather it does not find the complete line.
If you like, you can send it to me, to my email
Thank you


I do the translation with google translate, hope the translation is correct

Last edited by ector1935 (Yesterday 10:30:02)

Offline

#4 Yesterday 11:33:32

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

Re: Accuweather Conky Script

Thanks @marens for all your maintenance and development work on @TGB's accuweather script. The changes you made have always been 'spot-on'.
Sorry to see these may have been your last - but understand your intentions.

Last edited by ceeslans (Yesterday 12:11:57)

Offline

#5 Yesterday 12:42:40

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

Re: Accuweather Conky Script

@ector1935

I'm sorry, but the accuweather script I use is modified and different from the original one.

You can find the script you are looking for here:
https://forums.linuxmint.com/viewtopic. … 0#p2753540

You need to change the paths and address (your location).

Then you first need to do this:
https://forums.bunsenlabs.org/viewtopic … 01#p149001

After that, make the changes from yesterday (post above).

Tip:
No need to search for the entire line in a text editor.
A small part of the line is enough.

Example from my post above (find it first):

-o $HOME/Accuweather_conky_script/curr_cond_raw "$curr_addr"

When you find it in the text editor, check if the rest of the line is the same.

Good luck!


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

Offline

#6 Yesterday 12:50:40

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

Re: Accuweather Conky Script

@ceeslans

Thanks.

As I said before, it's pointless to fix a script several times a month.
If Accuweather developers continue to make frequent changes...  that's the end.

I still use Gis Weather.
The TAD script is also working well for now.


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

Offline

#7 Yesterday 13:23:35

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

Re: Accuweather Conky Script

@marens

Thanks for this latest - possibly final - round of fixes to the Acc conky script.  You've helped so much over these past few years, and I can understand how tiresome it is to keep trying to work around Accuweather's website changes every few months.  I'm of course sad because it's likely these fixes won't last long, but you've earned your rest.

Last edited by asqwerth (Yesterday 13:23:50)

Offline

#8 Yesterday 18:56:41

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

Re: Accuweather Conky Script

^ Thanks.

I don't know if you've noticed that the site has switched to a new set of icons, which we talked about at the end of last year:
https://forums.bunsenlabs.org/viewtopic.php?id=9641

I still like the old ones (2015, 2016).  smile


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

Offline

Board footer

Powered by FluxBB