The fix for current Multi Weather cookie issue
Hawkedon opened this issue · 4 comments
Hi @ronie,
To fix the current Multi Weather cookie issue, you just need to add the following option to the header for request and use 'A1' cookie afterwards:
'Accept': 'text/html,application/xhtml+xml,application/xml'
Hope a new update can be pushed to official repo soon!
thanx for the suggestion @Hawkedon
i've tried your fix using this script, but it did not work for me...
import requests
URL = 'https://www.yahoo.com/'
HEADERS = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) \
Chrome/89.0.4389.72 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml'}
response = requests.get(URL, headers=HEADERS)
print(response.cookies)
the request did not return any cookies.
Hi @ronie,
I run your code and can get cookie successfully. I reinstalled Kodi on Xbox recently from fresh start due to other issues, and found this addon was broken. Then I investigated the issue with Fiddler and found the problem. After applying the fix that I mentioned, the addon works now on Xbox. Not sure what's the problem of your side, but I think it's harmless to push an update with this fix, to see if the problem fixed for other people.
BTW, you can use the composer function of Fiddler to test this. Without the 'Accept' field, no 'Set-Cookie' response header field returned, after adding this field, the cookie can be returned. I tested this several days ago, only 'A1' cookie returned, but today's tests show 'A1', 'A1S' and 'A3' returned.
thanx for confirming the fix works correctly for you.
as it turns out, a few additional steps are needed for EU users (like me) to get past their cookie wall.
i'll post a new version of the addon, including your fix, on the forum for people to test.
if no issues are found, i'll submit it to the addon repo.
Sounds good.