Kodi Community Forum
Broken Multi Weather - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Weather Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=155)
+---- Thread: Broken Multi Weather (/showthread.php?tid=352028)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25


RE: Multi Weather - Napster32 - 2022-05-02

I did not understand what is the procedure you do both to obtain the correct cookies and to insert them in the addon script. could you tell us what the procedure is? thank you very much


RE: Multi Weather - jose1711 - 2022-05-03

(2022-05-02, 14:31)Napster32 Wrote: Where can I temporarily (until the script is officially fixed) find the file you have edited?
Could you share it? Thank you so much

I can write down steps but first please specify whether the host running Kodi is a Linux machine and you're able to run commands there (like e. g. sed). Thanks, jose


RE: Multi Weather - ronie - 2022-05-03

(2022-05-02, 12:52)jose1711 Wrote: @Napster32 I bet you have cookies still saved in your settings. Anyhow.. I checked the in-browser cookies and they contain the following keys:
- A1
- A1S
- A3
- cmp
- EuConsent
- GUC
- thamba
- yhcstamp

Addon is looking for a key called 'B' so that cannot work either. Or perhaps I am doing something completely wrong.

nope, you're not seeing it wrong.

yahoo used to set a 'B' cookie, which was needed to retrieve the weather forecast.
currently, only the 'A3' cookie seems to be needed to get the data.

the problem is getting that cookie using a python script.
while that was no problem before, i can't get it to work anymore.

...i wouldn't be surprised if yahoo is actively trying to block scripts though


RE: Multi Weather - jose1711 - 2022-05-04

(2022-05-02, 21:44)Napster32 Wrote: I did not understand what is the procedure you do both to obtain the correct cookies and to insert them in the addon script. could you tell us what the procedure is? thank you very much

I was able to reproduce success with steps below. Note that Linux system is assumed but you should be able to follow even if Kodi is running on other system.
Code:

(unless you can afford data loss) backup everything in ~/.kodi and start with a clean profile
# or at least move ~/.kodi/addons/weather.multi and ~/.kodi/userdata/addon_data/weather.multi somewhere else
cd ~/.kodi/addons
git clone https://gitlab.com/ronie/weather.multi.git
cd weather.multi/lib/
edit weather.py changing this line:
  response = requests.get(url, headers=HEADERS, cookies=dict(B=cookie), timeout=10)
to
  response = requests.get(url, headers=HEADERS, cookies=dict(A1=cookie), timeout=10)
run kodi - enable addon - configure location
exit kodi
visit https://weather.yahoo.com in your browser
display source code of the webpage (ctrl-U in ff for instance)
search for "crumb" variable - take a note of it
use a developer toolbar or a browser addon to read www.yahoo.com cookies, look for the one called A1 - save its value
cd ~/.kodi/userdata/addon_data/weather.multi/
edit settings.xml setting the values manually
    <setting id="ycookie">VALUE_NOTED_EARLIER</setting>
    <setting id="ycrumb">VALUE_NOTED_EARLIER</setting>
    <setting id="ystamp">1651614190</setting>
save and start Kodi again
addon should be able to pull the weather info now

This is by no means a proper way of fixing this so.. consider yourself warned. The fact that it worked for me does not mean it will for anybody else. Also no idea how long this may last.

Btw, Roni suggested A3 - it did work for me using A1. So if it's not working you may want to try other letters.


RE: Multi Weather - spl147 - 2022-05-07

can we get a option in the addon to disable yahoo?


RE: Multi Weather - ronie - 2022-05-10

here's an updated version of the addon that should fix the current issues:
weather.multi-0.0.14.zip

the addon might fail to fetch weather data the first time it runs, but it should be back to normal the second time.
(it runs every 30 mins)
you can also restart kodi after installation, to speed up this process.


RE: Multi Weather - Napster32 - 2022-05-10

(2022-05-10, 01:46)ronie Wrote: here's an updated version of the addon that should fix the current issues:
weather.multi-0.0.14.zip

the addon might fail to fetch weather data the first time it runs, but it should be back to normal the second time.
(it runs every 30 mins)
you can also restart kodi after installation, to speed up this process.
Hi @ronie,
Can you apply this fix at weather.yahoo for Kodi 18.9?
Thanks a lot


RE: Multi Weather - Klojum - 2022-05-10

(2022-05-10, 01:46)ronie Wrote: here's an updated version of the addon that should fix the current issues:

It's still a bit weird to me. MultiWeather in Kodi19+Ubuntu keeps working, while MW in LibreELEC+Kodi19 keeps having problems. I take it the updates will be in the repo some time today/tomorrow, then I can test again.


RE: Multi Weather - ronie - 2022-05-10

@Klojum older installations of the addon are still working fine,
but if you recently tried to install it, it fails.

i'll submit the updated version to the addon repo once a few users have tested it and confirm it's working ok.


RE: Multi Weather - Napster32 - 2022-05-10

I have jus tryed it in my new installation of LibreElec 10.0.2 with Kodi 19.4 in Raspberry Pi 3B+.
Now the Addon works perfectly!
@ronie now can you apply the fix at the old addon weatherbit.io and yahoo weather addon for Kodi 18.9?
Thanks a lot!


RE: Multi Weather - ronie - 2022-05-10

nope sorry, i no longer maintain any addons for kodi 18.


RE: Multi Weather - davidx - 2022-05-12

weather.multi-0.0.14.zip did the trick for me. everything works again. thanx!


RE: Multi Weather - Klojum - 2022-05-12

Same here.


RE: Multi Weather - ronie - 2022-05-12

cool, thanx for testing.

the new version has been submitted to the addon repo.


RE: Multi Weather - Napster32 - 2022-05-12

(2022-05-12, 22:52)ronie Wrote: cool, thanx for testing.

the new version has been submitted to the addon repo.
Thanks a lot Ronie!