matthuisman / kayo-for-channels Goto Github PK
View Code? Open in Web Editor NEWKayo for Channels
License: MIT License
Kayo for Channels
License: MIT License
Hi Matt,
Firstly awesome work you do here! I thought i would throw my hat at trying to get flash news going, (it will require small changes from your code from binge or kayo i said to myself thinking its also using streammotion......)
What exactly does the CLIENT ID do on your scripts when logging into stream motion ( i am assuming this is unique per service eg Binge different to Kayo which is different to FlashNews ? where do you source it from ?
Thanks for any advice.
Both channels seem to have disappeared.
This has been working fine for me for quite sometime, but after a server reboot today it no longer works. I've uninstalled and reinstalled it, but no luck. I set up docker on a test computer, in the same network, and it's working fine.
On my main computer though I can see it only makes 1 dns query, for e2655.dsca.akamaiedge.net, and then it fails with "Make sure you're in Australia". On the test computer it only makes 1 dns query, for auth.streamotion.com.au.
Funny thing, I've just gone to check the test computer and it too is now failing, same issue. I can't even figure out from the source code what would make a request to e2655.dsca.akamaiedege.net.
2022-11-20 08:06:58 File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 971, in json
2022-11-20 08:06:58 return complexjson.loads(self.text, **kwargs)
2022-11-20 08:06:58 File "/usr/local/lib/python3.8/json/__init__.py", line 357, in loads
2022-11-20 08:06:58 return _default_decoder.decode(s)
2022-11-20 08:06:58 File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode
2022-11-20 08:06:58 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
2022-11-20 08:06:58 File "/usr/local/lib/python3.8/json/decoder.py", line 355, in raw_decode
2022-11-20 08:06:58 raise JSONDecodeError("Expecting value", s, err.value) from None
2022-11-20 08:06:58 json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2022-11-20 08:06:58
2022-11-20 08:06:58 During handling of the above exception, another exception occurred:
2022-11-20 08:06:58
2022-11-20 08:06:58 Traceback (most recent call last):
2022-11-20 08:06:58 File "/usr/src/app/kayo.py", line 40, in _oauth_token
2022-11-20 08:06:58 token_data = requests.post('https://auth.streamotion.com.au/oauth/token', json=data, headers=HEADERS).json()
2022-11-20 08:06:58 File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 975, in json
2022-11-20 08:06:58 raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
2022-11-20 08:06:58 requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2022-11-20 08:06:58
2022-11-20 08:06:58 During handling of the above exception, another exception occurred:
2022-11-20 08:06:58
2022-11-20 08:06:58 Traceback (most recent call last):
2022-11-20 08:06:58 File "./app.py", line 116, in <module>
2022-11-20 08:06:58 kayo.login(USERNAME, PASSWORD)
2022-11-20 08:06:58 File "/usr/src/app/kayo.py", line 137, in login
2022-11-20 08:06:58 self._oauth_token(payload)
2022-11-20 08:06:58 File "/usr/src/app/kayo.py", line 42, in _oauth_token
2022-11-20 08:06:58 raise Exception('Unable to fetch token. Check your location is in Australia.')
2022-11-20 08:06:58 Exception: Unable to fetch token. Check your location is in Australia.```
Hi Matt,
Thanks for this - awesome work - and functions really well!
Any thoughts as to adding other sources - similar to what you have for Slyguy?
Particularly interested in Stan/Stan Sports? As M3u
But regardless, thanks & well done!
Hi Matt - I pulled this down today and it worked great! I added it to channels and could watch without issue. About an hour later it was failing, checking the logs shows that the auth is failing, comes back with "Unable to fetch token. Check your location is in Australia." - I have my dns all setup correctly - do you know why it could be failing after it worked initially?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./app.py", line 116, in <module>
kayo.login(USERNAME, PASSWORD)
File "/usr/src/app/kayo.py", line 138, in login
self._oauth_token(payload)
File "/usr/src/app/kayo.py", line 43, in _oauth_token
raise Exception('Unable to fetch token. Check your location is in Australia.')
Exception: Unable to fetch token. Check your location is in Australia.
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 96, in create_connection
raise err
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 86, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 358, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fc62b44e6d0>: Failed to establish a new connection: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='auth.streamotion.com.au', port=443): Max retries exceeded with url: /oauth/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fc62b44e6d0>: Failed to establish a new connection: [Errno 110] Connection timed out'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/app/kayo.py", line 41, in _oauth_token
token_data = self._session.post('https://auth.streamotion.com.au/oauth/token', json=data, headers={'User-Agent': 'okhttp/3.10.0'}).json()
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 590, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='auth.streamotion.com.au', port=443): Max retries exceeded with url: /oauth/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fc62b44e6d0>: Failed to establish a new connection: [Errno 110] Connection timed out'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./app.py", line 116, in <module>
kayo.login(USERNAME, PASSWORD)
File "/usr/src/app/kayo.py", line 138, in login
self._oauth_token(payload)
File "/usr/src/app/kayo.py", line 43, in _oauth_token
raise Exception('Unable to fetch token. Check your location is in Australia.')
Exception: Unable to fetch token. Check your location is in Australia.
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 96, in create_connection
raise err
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 86, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 358, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fde006fb6d0>: Failed to establish a new connection: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='auth.streamotion.com.au', port=443): Max retries exceeded with url: /oauth/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fde006fb6d0>: Failed to establish a new connection: [Errno 110] Connection timed out'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/app/kayo.py", line 41, in _oauth_token
token_data = self._session.post('https://auth.streamotion.com.au/oauth/token', json=data, headers={'User-Agent': 'okhttp/3.10.0'}).json()
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 590, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='auth.streamotion.com.au', port=443): Max retries exceeded with url: /oauth/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fde006fb6d0>: Failed to establish a new connection: [Errno 110] Connection timed out'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./app.py", line 116, in <module>
kayo.login(USERNAME, PASSWORD)
File "/usr/src/app/kayo.py", line 138, in login
self._oauth_token(payload)
File "/usr/src/app/kayo.py", line 43, in _oauth_token
raise Exception('Unable to fetch token. Check your location is in Australia.')
Exception: Unable to fetch token. Check your location is in Australia.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.