RE: Multi Weather - nic020 - 2024-01-23
Hello,
In France.
url 'https://www.yahoo.com/?guccounter=1' failed.
Same issue with url 'https://www.yahoo.com/news/weather/?guccounter=1'.
url 'https://www.yahoo.com/?guccounter=2' and 'https://www.yahoo.com/?guccounter=' are ok.
Can you try url 'https://www.yahoo.com/?guccounter=' in your contry ?
RE: Multi Weather - dakh - 2024-01-30
In UK Multi Weather stopped working today (30 Jan 2024).
Changed to CURL = 'https://www.yahoo.com/?guccounter=1'
from CURL = 'https://www.yahoo.com/?guccounter=2'
Seems all good now on CoreElec 20.2. Add-on version 0.0.22
RE: Multi Weather - ronie - 2024-02-01
i'm a bit at a loss on what's going on with this...
no idea if different countries need a different url these days,
or whether they regularly change the url or not.
for me, most of the mentioned url's work fine (only the 'guccounter=2' doesn't work on my end).
so i've made a version which tries all of the url's mentioned above, until it gets the cookie it needs:
weather.multi-0.0.24.zip
weather.multi-0.0.25.zip
please test if you're interested and let me know how it goes.
thx!
RE: Multi Weather - sus67 - 2024-02-01
(2024-02-01, 02:11)ronie Wrote: weather.multi-0.0.24.zip
please test if you're interested and let me know how it goes.
thx! Working for Germany. Thx.
https://paste.kodi.tv/paviyihibi.kodi
RE: Multi Weather - mentat - 2024-02-01
(2024-02-01, 02:11)ronie Wrote: i'm a bit at a loss on what's going on with this...
no idea if different countries need a different url these days,
or whether they regularly change the url or not.
for me, most of the mentioned url's work fine (only the 'guccounter=2' doesn't work on my end).
so i've made a version which tries all of the url's mentioned above, until it gets the cookie it needs:
weather.multi-0.0.24.zip
please test if you're interested and let me know how it goes.
thx!
I wonder if it would be instructive or helpful to store the "successful" URL in the "settings.xml" file...
Perhaps the URL could then be viewed or changed through the Add-on "settings" interface?
Just an idea.
Thanks.
RE: Multi Weather - nic020 - 2024-02-02
Hello,
Have tested version weather.multi-0.0.24.zip but it don't work in France.
Partial kodi.log -> ko
Quote:2024-02-02 11:30:06.886 T:6464 debug <general>: CPythonInvoker(7, C:\Users\nic020\AppData\Roaming\Kodi\addons\weather.multi\default.py): instantiating addon using automatically obtained id of "weather.multi" dependent on version 3.0.0 of the xbmc.python api
2024-02-02 11:30:07.541 T:6464 debug <general>: weather.multi: version 0.0.24 started: ['C:\\Users\\nic020\\AppData\\Roaming\\Kodi\\addons\\weather.multi\\default.py', '1']
2024-02-02 11:30:07.541 T:6464 debug <general>: weather.multi: location: Paris, Ile-de-France, FR
2024-02-02 11:30:07.541 T:6464 debug <general>: weather.multi: location id: 615702
2024-02-02 11:30:07.541 T:6464 debug <general>: weather.multi: cookie from settings:
2024-02-02 11:30:07.541 T:6464 debug <general>: weather.multi: crumb from settings:
2024-02-02 11:30:07.541 T:6464 debug <general>: weather.multi: stamp from settings:
2024-02-02 11:30:09.042 T:10000 debug <general>: CAESinkDirectSound:einitialize: Cleaning up
2024-02-02 11:30:09.324 T:6464 debug <general>: weather.multi: EU user
2024-02-02 11:30:09.325 T:6464 debug <general>: weather.multi: EU token: Y2sqd3A
2024-02-02 11:30:09.325 T:6464 debug <general>: weather.multi: EU sessionid: 3_cc-session_6a87944a-cb40-45ac-b23b-1da62e98b8ac
2024-02-02 11:30:09.325 T:6464 debug <general>: weather.multi: EU redirect https://www.yahoo.com/?guccounter=1
2024-02-02 11:30:10.060 T:6464 debug <general>: weather.multi: cookies: <RequestsCookieJar[]>
2024-02-02 11:30:11.574 T:5300 info <general>: Skipped 3 duplicate messages..
2024-02-02 11:30:11.574 T:5300 debug <general>: ------ Window Init (Pointer.xml) ------
2024-02-02 11:30:11.982 T:6464 debug <general>: weather.multi: cookies: <RequestsCookieJar[]>
2024-02-02 11:30:12.431 T:6464 debug <general>: weather.multi: save cookie to settings:
2024-02-02 11:30:12.431 T:6464 debug <general>: weather.multi: save crumb to settings: 5YY5smmobLY
2024-02-02 11:30:12.432 T:6464 debug <general>: weather.multi: save stamp to settings: 1706869812
2024-02-02 11:30:12.432 T:6464 debug <general>: weather.multi: no cookie
2024-02-02 11:30:12.432 T:6464 debug <general>: weather.multi: available locations: 1
2024-02-02 11:30:12.432 T:6464 debug <general>: weather.multi: finished
2024-02-02 11:30:12.432 T:6464 debug <general>: CPythonInvoker(7, C:\Users\nic020\AppData\Roaming\Kodi\addons\weather.multi\default.py): script successfully run
After some searches, I found it's because ysess Session() was already open.
To fix, I moved line 89 to line 99 in file weather.py and in kodi.log you can see that Weather.multi check all url to find cookies.
kodi.log with patch -> ok
Quote:2024-02-02 11:33:32.520 T:8372 debug <general>: CPythonInvoker(7, C:\Users\nic020\AppData\Roaming\Kodi\addons\weather.multi\default.py): instantiating addon using automatically obtained id of "weather.multi" dependent on version 3.0.0 of the xbmc.python api
2024-02-02 11:33:33.166 T:8372 debug <general>: weather.multi: version 0.0.24 started: ['C:\\Users\\nic020\\AppData\\Roaming\\Kodi\\addons\\weather.multi\\default.py', '1']
2024-02-02 11:33:33.166 T:8372 debug <general>: weather.multi: location: Paris, Ile-de-France, FR
2024-02-02 11:33:33.166 T:8372 debug <general>: weather.multi: location id: 615702
2024-02-02 11:33:33.166 T:8372 debug <general>: weather.multi: cookie from settings:
2024-02-02 11:33:33.166 T:8372 debug <general>: weather.multi: crumb from settings:
2024-02-02 11:33:33.166 T:8372 debug <general>: weather.multi: stamp from settings:
2024-02-02 11:33:34.965 T:8372 debug <general>: weather.multi: EU user
2024-02-02 11:33:34.967 T:8372 debug <general>: weather.multi: EU token: CeYDObM
2024-02-02 11:33:34.967 T:8372 debug <general>: weather.multi: EU sessionid: 3_cc-session_d7a4657c-3067-44e3-9077-22d26491e3da
2024-02-02 11:33:34.967 T:8372 debug <general>: weather.multi: EU redirect https://www.yahoo.com/?guccounter=1
2024-02-02 11:33:35.745 T:8372 debug <general>: weather.multi: cookies: <RequestsCookieJar[]>
2024-02-02 11:33:36.461 T:8372 debug <general>: weather.multi: EU user
2024-02-02 11:33:36.462 T:8372 debug <general>: weather.multi: EU token: AxUFK3Q
2024-02-02 11:33:36.462 T:8372 debug <general>: weather.multi: EU sessionid: 3_cc-session_988ac64e-192f-42c0-ba12-c8a57116cebe
2024-02-02 11:33:36.462 T:8372 debug <general>: weather.multi: EU redirect https://www.yahoo.com/?guccounter=2
2024-02-02 11:33:36.628 T:8372 debug <general>: weather.multi: cookies: <RequestsCookieJar[<Cookie A1=d=AQABBADFvGUCEBKXELDvyp-PkDtXq6NiPxkFEgABCAETvmXkZeUzb2UBAiAAAAcI_ ...
2024-02-02 11:33:37.061 T:8372 debug <general>: weather.multi: save cookie to settings: d=AQABBADFvGUCEBKXELDvyp-PkDtXq6NiPxkFEgABCAETvmXkZeUzb2UBAiAAAAcI_ ...
2024-02-02 11:33:37.061 T:8372 debug <general>: weather.multi: save crumb to settings: 6NwFhK2lbpX
2024-02-02 11:33:37.061 T:8372 debug <general>: weather.multi: save stamp to settings: 1706870017
2024-02-02 11:33:37.062 T:8372 debug <general>: weather.multi: weather location: 615702
2024-02-02 11:33:37.242 T:8372 debug <general>: weather.multi: yahoo forecast data: {'weathers': [{'woeid': 615702, 'unit': 'imperial', 'location': {'woeid': 615702, ....
2024-02-02 11:33:37.249 T:8372 debug <general>: weather.multi: available locations: 1
2024-02-02 11:33:37.249 T:8372 debug <general>: weather.multi: finished
2024-02-02 11:33:37.249 T:8372 debug <general>: CPythonInvoker(7, C:\Users\nic020\AppData\Roaming\Kodi\addons\weather.multi\default.py): script successfully run
Fix: weather.py
Replace::
88: def get_ycreds(self):
89: ysess = requests.Session()
90: ycookie = ADDON.getSettingString('ycookie')
91: ycrumb = ADDON.getSettingString('ycrumb')
92: ystamp = ADDON.getSettingString('ystamp')
93: log('cookie from settings: %s' % ycookie)
94: log('crumb from settings: %s' % ycrumb)
95: log('stamp from settings: %s' % ystamp)
96: if ystamp == '' or (int(time.time()) - int(ystamp) > 31536000): # cookie expires after 1 year
97: try:
98: for URL in CURL:
99: retry = 0
100: while (retry < 6) and (not self.MONITOR.abortRequested()):
101: response = ysess.get(URL, headers=HEADERS, timeout=10)
102: if response.status_code == 200:
103: break
By::
88: def get_ycreds(self):
89:* #ysess = requests.Session()
90: ycookie = ADDON.getSettingString('ycookie')
91: ycrumb = ADDON.getSettingString('ycrumb')
92: ystamp = ADDON.getSettingString('ystamp')
93: log('cookie from settings: %s' % ycookie)
94: log('crumb from settings: %s' % ycrumb)
95: log('stamp from settings: %s' % ystamp)
96: if ystamp == '' or (int(time.time()) - int(ystamp) > 31536000): # cookie expires after 1 year
97: try:
98: for URL in CURL:
99:* ysess = requests.Session()
100 retry = 0
101: while (retry < 6) and (not self.MONITOR.abortRequested()):
102: response = ysess.get(URL, headers=HEADERS, timeout=10)
103: if response.status_code == 200:
104: break
[/quote]
RE: Multi Weather - ronie - 2024-02-04
thanx!
it indeed makes sense to restart the session with each url.
fixed in:
weather.multi-0.0.25.zip
RE: Multi Weather - mentat - 2024-02-04
(2024-02-04, 19:24)ronie Wrote: thanx!
it indeed makes sense to restart the session with each url.
fixed in:
weather.multi-0.0.25.zip
Works in Canada (Clean Install).
Thanks.
RE: Multi Weather - nic020 - 2024-02-05
Thanks for update,
weather.multi-0.0.25.zip works in France.
RE: Multi Weather - sus67 - 2024-02-05
(2024-02-05, 11:25)nic020 Wrote: Thanks for update,
weather.multi-0.0.25.zip works in France. +1
works in Germany, too.👍🏻
RE: Multi Weather - bkanuka - 2024-04-27
0.0.25 works for me in Canada. Thanks!
RE: Multi Weather - ErikBrown - 2024-04-30
Thanks for the fix (version 0.0.25). The add-on stopped working a few weeks ago on my main Kodi device. It did not get any weather data anymore. I have the add-on running on several devices and strange enough, on some devices it still works while on others it doesn't. Re-installing the add-on from the Kodi repository did not solve the issue since that has only version 0.0.22. Today I found out that version 0.0.25 is available here and that fixed the issue.
May I suggest that you update the version on the Kodi repository so that less technical users can also keep enjoying the add-on while it could otherwise stop working for them at some point?
RE: Multi Weather - ronie - 2024-04-30
yup, it slipped my mind for a bit, but it's up for review now:
https://github.com/xbmc/repo-scripts/pull/2616
RE: Multi Weather - kittmaster - 2024-05-13
https://paste.kodi.tv/apegiconow.kodi
I can't get this to work. When I put my trailer away in Nov. 2023, it was on version .18, and worked.
I start up and I get some crazy numbers like 2400F another is -32F. I've tried to update to .26, same result, tried .25 which is what the log results are... same thing.
Can't get it to work, what is the fix?
RE: Multi Weather - wags1 - 2024-05-13
(2024-05-13, 00:13)kittmaster Wrote: https://paste.kodi.tv/apegiconow.kodi
I can't get this to work. When I put my trailer away in Nov. 2023, it was on version .18, and worked.
I start up and I get some crazy numbers like 2400F another is -32F. I've tried to update to .26, same result, tried .25 which is what the log results are... same thing.
Can't get it to work, what is the fix?
Do you see the same behavior using the Kodi default skin?
|