matthuisman / slyguy.addons

Github mirror of SlyGuy add-ons
https://www.matthuisman.nz/2020/02/slyguy-kodi-repository.html
263 stars 70 forks source link

Kayo / Binge / Flash News / Foxtel JSON Errors #586

Open matthuisman opened 9 months ago

matthuisman commented 9 months ago

They appear to be using Akamai AI bot detection to detect the behaviour of the addons and then blocking them.

I am taking a break from trying to fix as it's just too annoying.

If you want to help - contact all of them and tell them to stop unblocking. Also let them know if your official apps also sometimes are blocked (false positives)

More pressure = more likely they get rid of this stupidness

matthuisman commented 8 months ago

i wont be merging the 2x current PRs. they are not a fix. just a workaround. I dont want to give everyone hope. plus, when everyone switches - it very well may stop working again.

scottydulton commented 8 months ago

no probs, i thought it would be worth a try to see if it breaks in the meantime.

CV8R commented 8 months ago

Work-around still working for us.

Anybody have any success in getting Binge running for VOD? Live works with the work-around but no success with VOD but I think its to do with the way I have hacked the file.

I added the changes to plugin.py and in api.py I have added UDID = str(uuid.uuid4()) but not working. Looks like it is implemented differently.

        UDID = str(uuid.uuid4())

        payload = {
            'assetId': asset_id,
            'application': {'name':'binge', 'appId':'binge.com.au'},
            'device':{'id':UDID, 'type':'android'},
            'player':{'name':'exoPlayerTV'},
            'ads':{'optOut': False},
            'capabilities':{'codecs':['avc']},
            'session':{'intent':'playback'}
        }

also tried replacing UDID in payload with str(uuid.uuid4()) but same result.

nickneos commented 8 months ago

@JCalvi thanks for the login instructions. Worked for me on my firestick once I found where settings.xml is kept on the device.

We'll see how long this lasts for.

nickneos commented 8 months ago

Started getting JSON errors again today ☹️

Think I've come to accept I'll just have to use the official app from now on

coxy86 commented 8 months ago

I've just emailed Foxtel again regarding this forced change to the Foxtel go platform, might just email them every week until I get a human response from them!!!

gregeeh commented 8 months ago

Just completed the workaround for Kayo and I can select my profile, after a couple of attempts, but if I try to play something I get an error "One or more items failed to play".

Log shows:

2023-10-19 13:15:48.900 T:4326     info <general>: VideoPlayer::OpenFile: plugin://plugin.video.kayo.sports/?_=play&_play=1&id=211249&play_type=0&start_from=1
2023-10-19 13:15:48.901 T:4583     info <general>: Creating InputStream
2023-10-19 13:15:48.940 T:4583  warning <general>: AddOnLog: inputstream.adaptive: Set headers to the manifest url by using pipe "|" char is deprecated, and will be removed in future.
                                                   Use "inputstream.adaptive.manifest_headers" and "inputstream.adaptive.stream_headers" properties instead.
2023-10-19 13:15:48.942 T:4583     info <general>: AddOnLog: inputstream.adaptive: [Repr. chooser] Resolution set: 1920x1080, max allowed: 3840x2160, Adjust refresh rate: 1
2023-10-19 13:15:48.942 T:4583    error <general>: GetDirectory - Error getting /usr/lib/kodi/addons/inputstream.adaptive/
2023-10-19 13:15:49.719 T:4583     info <general>: AddOnLog: inputstream.adaptive: Successfully parsed manifest file (Periods: 1, Streams in first period: 2, Type: VOD)
2023-10-19 13:15:51.263 T:4587     info <general>: script.module.slyguy - WV License response OK and returned data
2023-10-19 13:15:51.301 T:4583    error <general>: AddOnLog: inputstream.adaptive: SendSessionMessage: License update not successful (no keys)
2023-10-19 13:15:51.333 T:4583    error <general>: AddOnLog: inputstream.adaptive: Initialize failed (SingleSampleDecrypter)
2023-10-19 13:15:51.335 T:4583    error <general>: CVideoPlayer::OpenInputStream - error opening [plugin://plugin.video.kayo.sports/?_=play&_play=1&id=211249&play_type=0&start_from=1]
2023-10-19 13:15:51.335 T:4583     info <general>: CVideoPlayer::OnExit()
2023-10-19 13:15:51.335 T:4583     info <general>: ADDON: Dll Destroyed - InputStream Adaptive
2023-10-19 13:15:51.341 T:4326     info <general>: Loading skin file: DialogConfirm.xml, load type: KEEP_IN_MEMORY
2023-10-19 13:15:51.372 T:4326     info <general>: CVideoPlayer::CloseFile()
2023-10-19 13:15:51.376 T:4326     info <general>: VideoPlayer: waiting for threads to exit
2023-10-19 13:15:51.376 T:4326     info <general>: VideoPlayer: finished waiting
2023-10-19 13:15:52.255 T:4326     info <general>: Samba is idle. Closing the remaining connections

Thoughts?

f3sty commented 8 months ago

error : AddOnLog: inputstream.adaptive: SendSessionMessage: License update not successful (no keys)

That doesn't sound good? Do you have a valid auth token in settings.xml? The tokens are only valid for 10 hours before they expire from what I've seen. Also it can take a few attempts to start playback, mine seems to usually work on the second or third try.

@JCalvi thanks for the tips on updating the tokens in settings.xml. I've managed to automate the authentication and token replacement using a headless browser session, but expecting I'll get blocked any day now.

gregeeh commented 8 months ago

Do you have a valid auth token in settings.xml?

Yes, copied it from FF this morning, so assuming it's valid.

EDIT:

Here's the line I'm replacing, with changed email and a couple of token characters:

<setting id="_userdata">{&quot;username&quot;:&quot;greg@myemail.com.au&quot;,&quot;access_token&quot;:&quot;eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik56aEJPVFJHT0RjNE1FUkRSRFJEUTBVd1FrVkdNRGt4TVVVNVF6RTRRa0UzTkVVMk1rVkRRZyJ9.eyJodHRwOi8vZm94c3BvcnRzLmNvbS5hdS9tYXJ0aWFuX2lkIjoiYXV0aDB8NWM4NDYyNGY5NWEwYjQ1MzdkOWE4MzM3IiwiaHR0cHM6Ly92aW1vbmQvZW50aXRsZW1lbnRzIjpbeyJzdm9kIjoiNTg5IiwicXVhbGl0eSI6ImFsbCIsInN0cmVhbWNvdW50IjoxfV0sImh0dHBzOi8va2F5b3Nwb3J0cy5jb20uYXUvc3RhdHVzIjp7ImFjY291bnRfc3RhdHVzIjoiQUNUSVZFX1NVQlNDUklQVElPTiIsInN1Yl9hY2NvdW50X3N0YXR1cyI6IlBBWUlOR19TVUJTQ1JJUFRJT04iLCJwcHZfZXZlbnRzIjpbXSwidXBkYXRlZF9hdCI6IjIwMjMtMTAtMThUMDM6NTU6MDEuNDA3WiJ9LCJodHRwOi8vaXJkZXRvLmNvbS9jb250cm9sL2VudCI6W3siZXBpZCI6IldlYl9LQVlPXzFIRCIsImJpZCI6IkxJVEUifV0sImh0dHA6Ly9pcmRldG8uY29tL2NvbnRyb2wvanRpIjoiM2QzMmE3MGUtNmNmMC00MzVkLTg4ZDEtMTk0MThlMzE1MDM3IiwiaHR0cDovL2lyZGV0by5jb20vY29udHJvbC9haWQiOiJmb3h0ZWxvdHQiLCJpc3MiOiJodHRwczovL2F1dGguc3RyZWFtb3Rpb24uY29tLmF1LyIsInN1YiI6ImF1dGgwfDVjODQ2MjRmOTVhMGI0NTM3ZDlhODMzNyIsImF1ZCI6WyJzdHJlYW1vdGlvbi5jb20uYXUiLCJodHRwczovL3Byb2QtbWFydGlhbi5hdS5hdXRoMC5jb20vdXNlcmluZm8iXSwiaWF0IjoxNjk3NjgwOTMwLCJleHAiOjE2OTc2OTE3MzAsImF6cCI6IjNzQzJEeDVYMXRUd3RHbFc4ZjZjTjZZbmtPdVVJamNqIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBlbWFpbCBhZGRyZXNzIHBob25lIG9mZmxpbmVfYWNjZXNzIHVzZXI6cGhvbmVfdmVyaWZpZWQifQ.XBFg0fh7-u-Rtig6NRrkfxgXe3kMl9tYYzl4MsWN0UmZRL3mm3ja_UGSiuE0-igZOrKtcI5GDsFNVtbWlVLnVIlyr0wCkIwLyG6iCPgkV81loRt6nKaWlQHzpryZG4K-5Udcd8xvaFMlAJz9M5OXJgLP2jYhfCF3HvJQg-ght1FnSa2LG9LiNe4H1qTgK5e9u1ef60XaOItFTXyzfXgExiLIqPRob61RO06zgFETzHxOmziYOGImVy8XujT0meir4dhfOh8GZ7_9rv9XvqSA15KGX5Q9s_p_MUWE9vUkVnK398o3GmGVcrbTZhzQ9tixax_-DdTCwZFOdcXVqyetDA&quot;,&quot;expires&quot;:1697716930,&quot;refresh_token&quot;:&quot;v1.MvODVkRBWeImitQGelN-46Kfys8uJTsHNn32UD4mrOF1tY8MNo2dKOiCo_xmltNLfYUSkD1CjihZ6pQQA2dhMVw&quot;}</setting>

f3sty commented 8 months ago

Yes, copied it from FF this morning, so assuming it's valid.

The expires timestamp is 11pm tonight, so should be right providing you copied the tokens correctly. Have you tried watching a live channel?

gregeeh commented 8 months ago

Have you tried watching a live channel?

Sure have, with the same result unfortunately.

scottydulton commented 8 months ago

error : AddOnLog: inputstream.adaptive: SendSessionMessage: License update not successful (no keys)

That doesn't sound good? Do you have a valid auth token in settings.xml? The tokens are only valid for 10 hours before they expire from what I've seen. Also it can take a few attempts to start playback, mine seems to usually work on the second or third try.

@JCalvi thanks for the tips on updating the tokens in settings.xml. I've managed to automate the authentication and token replacement using a headless browser session, but expecting I'll get blocked any day now.

how did you do that?

f3sty commented 8 months ago

how did you do that?

I'm using playwright to script the login through a headless firefox browser and save the session state, then pulling the tokens etc out of the localstorage and populating a settings.xml template. My kodi box runs libreelec so is missing things like pip, so I'm running the script from a different box via cron which also copies the settings.xml over via scp an hour or two before the token expires. Its very hacky and convoluted at the moment, but it proves the concept at least.

gregeeh commented 8 months ago

Yes, copied it from FF this morning, so assuming it's valid.

The expires timestamp is 11pm tonight, so should be right providing you copied the tokens correctly. Have you tried watching a live channel? This might explain why I having issues.

https://i.imgur.com/0bu2Hjv.jpeg

Not using any VPN, Proxy or such.

Does the same in all Browsers. Chrome, Edge, Brave, FF.

JCalvi commented 8 months ago

how did you do that?

I'm using playwright to script the login through a headless firefox browser and save the session state, then pulling the tokens etc out of the localstorage and populating a settings.xml template. My kodi box runs libreelec so is missing things like pip, so I'm running the script from a different box via cron which also copies the settings.xml over via scp an hour or two before the token expires. Its very hacky and convoluted at the moment, but it proves the concept at least.

I’m messing with similar, I was trying to get to local storage directly (through the Kodi plugin and sql) but then found Firefox have some proprietary encoding for the values in local storage. Then got Edge working as it writes a log file when you login to Kayo so can access that via Kodi python/plugin. This is all working and I will commit to the fork I made. https://github.com/JCalvi/slyguy.addons/commits/master

You log on to Kayo with edge, then select login in the Kodi plugin and choose a new use cached option. This parses the log file and grabs the tokens etc and writes them to settings.
I think the headless would be better though as I could save username/password and then call the headless login direct from the plug-in so could be done without leaving kodi, so I might have a play with that. Can you post what you have? Would save some time.

frankgrant commented 8 months ago

Just completed the workaround for Kayo and I can select my profile, after a couple of attempts, but if I try to play something I get an error "One or more items failed to play".

Log shows:

2023-10-19 13:15:48.900 T:4326     info <general>: VideoPlayer::OpenFile: plugin://plugin.video.kayo.sports/?_=play&_play=1&id=211249&play_type=0&start_from=1
2023-10-19 13:15:48.901 T:4583     info <general>: Creating InputStream
2023-10-19 13:15:48.940 T:4583  warning <general>: AddOnLog: inputstream.adaptive: Set headers to the manifest url by using pipe "|" char is deprecated, and will be removed in future.
                                                   Use "inputstream.adaptive.manifest_headers" and "inputstream.adaptive.stream_headers" properties instead.
2023-10-19 13:15:48.942 T:4583     info <general>: AddOnLog: inputstream.adaptive: [Repr. chooser] Resolution set: 1920x1080, max allowed: 3840x2160, Adjust refresh rate: 1
2023-10-19 13:15:48.942 T:4583    error <general>: GetDirectory - Error getting /usr/lib/kodi/addons/inputstream.adaptive/
2023-10-19 13:15:49.719 T:4583     info <general>: AddOnLog: inputstream.adaptive: Successfully parsed manifest file (Periods: 1, Streams in first period: 2, Type: VOD)
2023-10-19 13:15:51.263 T:4587     info <general>: script.module.slyguy - WV License response OK and returned data
2023-10-19 13:15:51.301 T:4583    error <general>: AddOnLog: inputstream.adaptive: SendSessionMessage: License update not successful (no keys)
2023-10-19 13:15:51.333 T:4583    error <general>: AddOnLog: inputstream.adaptive: Initialize failed (SingleSampleDecrypter)
2023-10-19 13:15:51.335 T:4583    error <general>: CVideoPlayer::OpenInputStream - error opening [plugin://plugin.video.kayo.sports/?_=play&_play=1&id=211249&play_type=0&start_from=1]
2023-10-19 13:15:51.335 T:4583     info <general>: CVideoPlayer::OnExit()
2023-10-19 13:15:51.335 T:4583     info <general>: ADDON: Dll Destroyed - InputStream Adaptive
2023-10-19 13:15:51.341 T:4326     info <general>: Loading skin file: DialogConfirm.xml, load type: KEEP_IN_MEMORY
2023-10-19 13:15:51.372 T:4326     info <general>: CVideoPlayer::CloseFile()
2023-10-19 13:15:51.376 T:4326     info <general>: VideoPlayer: waiting for threads to exit
2023-10-19 13:15:51.376 T:4326     info <general>: VideoPlayer: finished waiting
2023-10-19 13:15:52.255 T:4326     info <general>: Samba is idle. Closing the remaining connections

Thoughts?

I am getting the exact same error.

gregeeh commented 8 months ago

I am getting the exact same error.

When I was getting this error I attempted to play something several times hoping it would fix itself. Instead my IP got banned and I cannot go to kayosports.com.au. Get the error on all browsers on all devices and I'm not using any VPN, Proxies etc.

This is the error I got: https://i.imgur.com/0bu2Hjv.jpeg

Tried talking to Kayo support via live chat and I might as well been talking to a brick wall. So called my ISP and asked for a new IP and I was good to go.

So, tread softly.

JCalvi commented 8 months ago

Yes, i am close to sorting out the headless browser option and my IP got blocked as well. Have sent a complaint letter to Kayo.

f3sty commented 8 months ago

That's akamai blocking you, likely either because your IP now has a bad reputation score (global level) or because kayo have blacklisted you at akamai (customer level). Akamai can't remove your IP from a customer blocklist, only Kayo can do that - and good luck getting through to someone who would know how to escalate that request to their engineers. You can check if your IP has a bad reputation score at https://www.akamai.com/us/en/clientrep-lookup/ - my guess is that you won't be blocked because of reputation. but by an automated process at Kayo that's submitted your IP to akamai's client level blocklist. And no-one on Kayo's helpdesk would even know that they're automatically blocking IPs behind the scenes so they'll have no idea what you're talking about when you complain.

If you have already informed Kayo that they are blocking your residential IP address and therefor they are now knowingly failing to provide a service that you have paid for, the ACCC would probably like to know about that - especially if they continue to charge your subscription with no intention of providing a service. (https://www.accc.gov.au/consumers/buying-products-and-services/not-receiving-products-or-services-that-are-paid-for) If a few customers started reporting the IP blocking (and refusal to unblock) to ACCC, that might convince Kayo to rethink their strategy.

JCalvi commented 8 months ago

Thanks for the info, the result was: The IP Address xxxxxxxxx did not receive a bad risk score. So bad rep is not the reason for the block.

JCalvi commented 8 months ago

For those who want to live dangerously.

Here is the headless code, I saved this as mepwkayo.py...


#pip install playwright==1.39.0
#pip install playwright-stealth
#pyinstaller --onefile --noconsole --add-data="%LOCALAPPDATA%/Programs/Python/Python312/Lib/site-packages/playwright_stealth/js;./playwright_stealth/js" mepwkayo.py

import asyncio, os, re
from playwright.async_api import async_playwright, TimeoutError as PlaywrightTimeoutError, Playwright
from playwright_stealth import stealth_async
from time import sleep
from random import randint
from glob import glob
from os.path import expandvars

async def run(playwright: Playwright):

    fname = "mepwkayo-in.txt"
    text_file = open(fname, "r")
    data = text_file.read()
    text_file.close()

    username = re.search('"username":"([^"]*)"', str(data)).group(1)
    password = re.search('"password":"([^"]*)"', str(data)).group(1)
    headless = re.search('"headless":"([^"]*)"', str(data)).group(1) == "True"

    chromium = playwright.chromium # or "firefox" or "webkit".
    browser = await chromium.launch(channel="msedge", headless=headless) #Private
    page = await browser.new_page()
    await stealth_async(page)
    await page.goto('https://kayosports.com.au/')

    try:
        await page.locator('button:text("Sign In")').click(timeout=10000)
        await page.wait_for_url('**/login**');
        await page.get_by_text("Email or Mobile Number").fill(username,timeout=10000);
        sleep(randint(3500,5000)/1000) #emulate human wait to fill password.
        await page.get_by_text("Password", exact=True).fill(password,timeout=30000);
        await page.locator('button:text("Login")').click(timeout=30000);
        await page.wait_for_url('**/profile**');
        sleep(5) #make sure data has been written and profile page loaded and ready before grabbing data.
        data = str(await page.evaluate("() => localStorage"))
    except PlaywrightTimeoutError:
        data = "Timeout Error"

    fname = "mepwkayo-out.txt"
    text_file = open(fname, "w")
    text_file.write(data)
    text_file.close()

    await browser.close()

async def main():
    async with async_playwright() as playwright:
        await run(playwright)
asyncio.run(main())

I then built it into mepwkayo.exe with pyinstaller. pyinstaller --onefile --noconsole --add-data="%LOCALAPPDATA%/Programs/Python/Python312/Lib/site-packages/playwright_stealth/js;./playwright_stealth/js" mepwkayo.py

It also needs an input txt file called mepwkayo-in.txt that contains:

"username":"your username"
"password":"your password"
"headless":"True"

You can set headless to false if you want to watch the login before your eyes.

Then in plugin.py of kayo module:

import codecs
import time
import os, re, uuid

import arrow
from kodi_six import xbmc

from slyguy import plugin, gui, settings, userdata, signals, inputstream
from slyguy.log import log
from slyguy.exceptions import PluginError
from slyguy.constants import PLAY_FROM_TYPES, PLAY_FROM_ASK, PLAY_FROM_LIVE, PLAY_FROM_START, ROUTE_RESUME_TAG, ROUTE_LIVE_TAG, LIVE_HEAD

from .api import API
from .language import _
from .constants import *
from streamotion.constants import *
from random import randint

api = API()

@signals.on(signals.BEFORE_DISPATCH)
def before_dispatch():
    api.new_session()
    plugin.logged_in = api.logged_in

@plugin.route('')
def home(**kwargs):
    folder = plugin.Folder(cacheToDisc=False)

    if not api.logged_in:
        #_msedge_pw()
        folder.add_item(label=_(_.LOGIN, _bold=True), path=plugin.url_for(login), bookmark=False)
    else:
        folder.add_item(label=_(_.FEATURED, _bold=True), path=plugin.url_for(landing, title=_.FEATURED, name='home' if api.is_subscribed() else 'free'))
        folder.add_item(label=_(_.SHOWS, _bold=True), path=plugin.url_for(landing, title=_.SHOWS, name='shows'))
        folder.add_item(label=_(_.SPORTS, _bold=True), path=plugin.url_for(landing, title=_.SPORTS, name='sports'))
        folder.add_item(label=_(_.LIVE_CHANNELS, _bold=True), path=plugin.url_for(live))
        folder.add_item(label=_(_.SEARCH, _bold=True), path=plugin.url_for(search))

        if settings.getBool('bookmarks', True):
            folder.add_item(label=_(_.BOOKMARKS, _bold=True), path=plugin.url_for(plugin.ROUTE_BOOKMARKS), bookmark=False)

        folder.add_item(label=_.SELECT_PROFILE, path=plugin.url_for(select_profile), art={'thumb': userdata.get('avatar')}, info={'plot': userdata.get('profile_name')}, _kiosk=False, bookmark=False)
        folder.add_item(label=_.LOGOUT, path=plugin.url_for(logout), _kiosk=False, bookmark=False)

    folder.add_item(label=_.SETTINGS, path=plugin.url_for(plugin.ROUTE_SETTINGS), _kiosk=False, bookmark=False)

    return folder

@plugin.route()
def login(**kwargs):
    options = [
        [_.USE_CACHE, _msedge_pw],
        #[_.DEVICE_CODE, _device_code],
        #[_.EMAIL_PASSWORD, _email_password],

    ]

    index = 0 if len(options) == 1 else gui.context_menu([x[0] for x in options])
    if index == -1 or not options[index][1]():
        return

    #_select_profile() Crashes out on MSEdge Cached login
    gui.refresh()

def _msedge_pw():
    import subprocess
    process = subprocess.run("C:\Command\scripts\dist\mepwkayo.exe", cwd = "C:\Command\scripts\dist")
    fobject = "C:\Command\scripts\dist\mepwkayo-out.txt"
    text_file = open(fobject, "r", encoding="Latin-1")
    data = text_file.read()

    client_id = re.search('"client_id":"([^"]*)"', str(data)).group(1)
    access_token = re.search('"access_token":"([^"]*)"', str(data)).group(1)
    refresh_token = re.search('"refresh_token":"([^"]*)"', str(data)).group(1)
    email_address = re.search('"email":"([^"]*)"', str(data)).group(1)
    try:
        udid = re.search('"udid":"([^"]*)"', str(data)).group(1)
    except:
        udid = str(uuid.uuid4())

    expires_at = re.search('"exp":([^,]*),', str(data)).group(1)

    userdata.set('username', email_address)
    userdata.set('access_token', access_token)
    userdata.set('expires', int(expires_at))
    userdata.set('refresh_token', refresh_token)
    userdata.set('client_id', client_id)
    userdata.set('udid', udid)

    api._refresh_token(force=True)
    return True

and in api of kayo plugin

    def stream(self, asset_id):
        self._refresh_token()

        payload = {
            'assetId': asset_id,
            'canPlayHevc': settings.common_settings.getBool('h265', True),
           # 'contentType': 'application/xml+dash',
           # 'drm': True,
            'forceSdQuality': False,
            'playerName': 'exoPlayerTV',
            'udid': userdata.get('udid'),

        }
        data = self._session.post(PLAY_URL + '/play', json=payload, headers=self._auth_header)
        if ('status' in data and data['status'] != 200) or 'errors' in data:
            msg = data.get('detail') or data.get('errors', [{}])[0].get('detail')
            raise APIError(_(_.ASSET_ERROR, msg=msg))

        return data['data'][0]

and finally in api of the streammotion module...


    def _set_authentication(self):
        access_token = userdata.get('access_token')
        if not access_token:
            return
        expires = userdata.get('expires')
        if not expires or int(expires)-600 < int(time()):
            return

        self._auth_header = {'Authorization': 'Bearer {}'.format(access_token)}
        self.logged_in = True

You can change the location of the exe by altering the folder call in the plugin to where you want.

After all this I see that live streams are having more and more issues so I expect the bot is getting ever better at blocking, and has blocked the IP I was developing on (luck not my home IP) already.

I'm with Matt on trying to get KAYO to stop this blocking nonsense but post the above for others to persist if it helps.

glennguy commented 8 months ago

Wow well done @JCalvi

A thought I had on the bot detection.

Are we still on HLS playlists? If so, on the Kayo player the master playlist would download, a decision then made about which variant stream to play and then the variant stream downloads, playback begins. These downloads are within a split second of eachother.

On Kodi a lot of users are using Matt's quality selector which introduces usually a multi second delay between master/variant downloads. Maybe this is a metric looked at by Akamai?

Matt also mentioned the session cookies, this is maybe also something that trips it up. I have no idea how Akamai implement this but it could be the same as other bot detection systems such as captcha solving where if you don't look like 99% of others then you're a bot. 99% of clients send cookies x and y but not z, 1% of clients that send z get flagged.... Sorry for the word salad here but I hope it helps.

liam8888999 commented 8 months ago

I have the quality selector disabled and it doesn’t work so I don’t think it is that unless it’s still doing something related in the background On 21 Oct 2023, at 9:55 pm, Glenn Guy @.***> wrote: Wow well done @JCalvi A thought I had on the bot detection. Are we still on HLS playlists? If so, on the Kayo player the master playlist would download, a decision then made about which variant stream to play and then the variant stream downloads, playback begins. These downloads are within a split second of eachother. On Kodi a lot of users are using Matt's quality selector which introduces usually a multi second delay between master/variant downloads. Maybe this is a metric looked at by Akamai? Matt also mentioned the session cookies, this is maybe also something that trips it up. I have no idea how Akamai implement this but it could be the same as other bot detection systems such as captcha solving where if you don't look like 99% of others then you're a bot. 99% of clients send cookies x and y but not z, 1% of clients that send z get flagged.... Sorry for the word salad here but I hope it helps.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

JCalvi commented 8 months ago

Well, I've been blocked at home address now as well. This is the day after I only tested the above code a couple of times so be warned as above. It's like they look at an access log and then block the ip the next day. I have submitted a complaint again and will lodge with the ACCC now.

f3sty commented 8 months ago

Me too, and the only session I started today was via their android app :(

coxy86 commented 8 months ago

I've just submitted an ACCC complaint as well. I'm almost over Foxtel, paying premium for a rubbish experience!

closewall commented 8 months ago

the addon is obviously flooding requests to the service provider trying to get a valid response. i don’t blame them for blocking your ip address. a real client sends one request not ten or more every time you try to do something lol. they have introduced akamai to stop people using credential stuffing (stealing accounts). just use the real app? it works fine on any android device.

cucks like you might be cool with companies like foxtel collecting all your personal data through intrusive telemetry, but I'm not.

davecham76 commented 8 months ago

the addon is obviously flooding requests to the service provider trying to get a valid response. i don’t blame them for blocking your ip address. a real client sends one request not ten or more every time you try to do something lol. they have introduced akamai to stop people using credential stuffing (stealing accounts). just use the real app? it works fine on any android device.

No they have implemented it to block anyone wanting to use other devices so they can get unsolicited data. Their apps suck, even when they don’t buffer. You are obviously happy to lick their butts clean so no need to comment as you don’t care. If you don’t want to help with a solution then go to another thread.

davecham76 commented 8 months ago

I've just submitted an ACCC complaint as well. I'm almost over Foxtel, paying premium for a rubbish experience!

I am going to report as well and use their responses against them. They are obviously using their apps to collect more data than what they disclose so let’s see how much evidence they want to produce with their data collection.

davecham76 commented 8 months ago

you don’t want your data collected by foxtel? turn your phone off get off your computer and disconnect from the internet. don’t leave your house someone might harvest your data… everything you’re doing is being tracked by some company mate. 🤫

Again not helpful captain obvious

JCalvi commented 8 months ago

you don’t want your data collected by foxtel? turn your phone off get off your computer and disconnect from the internet. don’t leave your house someone might harvest your data… everything you’re doing is being tracked by some company mate. 🤫

Why are you on GitHub?

davecham76 commented 8 months ago

@JCalvi I blocked him and also reported, if you can be bothered it would be good if you can as well. Either they are a troll or work for fox/kayo. Either way don’t need people like that on GitHub.

scottydulton commented 8 months ago

anyone getting a playback error now? havent changed anything from when i last used now getting this in logs..

Capture

matthuisman commented 8 months ago

What device Scotty?

scottydulton commented 8 months ago

both pc and fire tv doing the same, pc log says single sample decrypter failing with no keys

matthuisman commented 8 months ago

Oh ok. I pushed updates to widevine CDM last night but that wouldn't affect android so don't think related

On Tue, 24 Oct 2023, 10:01 am scottydulton, @.***> wrote:

both pc and fire tv doing the same

— Reply to this email directly, view it on GitHub https://github.com/matthuisman/slyguy.addons/issues/586#issuecomment-1776014532, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPQAKOOUU3ZUSQXPBIYTADYA3LKZAVCNFSM6AAAAAA5VNG4NGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZWGAYTINJTGI . You are receiving this because you were mentioned.Message ID: @.***>

scottydulton commented 8 months ago

Oh ok. I pushed updates to widevine CDM last night but that wouldn't affect android so don't think related On Tue, 24 Oct 2023, 10:01 am scottydulton, @.> wrote: both pc and fire tv doing the same — Reply to this email directly, view it on GitHub <#586 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPQAKOOUU3ZUSQXPBIYTADYA3LKZAVCNFSM6AAAAAA5VNG4NGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZWGAYTINJTGI . You are receiving this because you were mentioned.Message ID: @.>

this is the windows log

2023-10-24 09:24:33.772 T:10236 debug : plugin.video.kayo.sports - Router Parsed: 'plugin://plugin.video.kayo.sports/?_=license_request&_headers=%7B%22user-agent%22%3A+%22Dalvik%2F2.1.0+%28Linux%3B+U%3B+Android+9%3B+SHIELD+Android+TV+Build%2FPPR1.180610.011%29%22%2C+%22accept%22%3A+%22%2A%2F%2A%22%2C+%22accept-charset%22%3A+%22UTF-8%2C%2A%3Bq%3D0.8%22%2C+%22content-type%22%3A+%22application%2Foctet-stream%22%7D&_path=special%3A%2F%2Ftemp%2Fproxy.plugin_request' => license_request {'_headers': '{"user-agent": "Dalvik/2.1.0 (Linux; U; Android 9; SHIELD Android TV Build/PPR1.180610.011)", "accept": "/", "accept-charset": "UTF-8,*;q=0.8", "content-type": "application/octet-stream"}', '_path': 'special://temp/proxy.plugin_request', 'url': 'plugin://plugin.video.kayo.sports/?=license_request&_headers=%7B%22user-agent%22%3A+%22Dalvik%2F2.1.0+%28Linux%3B+U%3B+Android+9%3B+SHIELD+Android+TV+Build%2FPPR1.180610.011%29%22%2C+%22accept%22%3A+%22%2A%2F%2A%22%2C+%22accept-charset%22%3A+%22UTF-8%2C%2A%3Bq%3D0.8%22%2C+%22content-type%22%3A+%22application%2Foctet-stream%22%7D&_path=special%3A%2F%2Ftemp%2Fproxy.plugin_request'} 2023-10-24 09:24:33.772 T:10236 debug : plugin.video.kayo.sports - Attempt 1/4: POST https://drm.streamotion.com.au/licenseServer/widevine/v1/streamotion/license 2023-10-24 09:24:33.793 T:10236 debug : plugin.video.kayo.sports - SSL Cipher: drm.streamotion.com.au - ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256) 2023-10-24 09:24:34.442 T:10896 debug : XCURL::DllLibCurlGlobal::CheckIdle - Closing session to http://127.0.0.1 (easy=0x2af88c4cd60, multi=0x0) 2023-10-24 09:24:34.651 T:10236 debug : plugin.video.kayo.sports - SIGNAL: after_dispatch 2023-10-24 09:24:34.652 T:10236 debug : plugin.video.kayo.sports - SIGNAL: on_close 2023-10-24 09:24:34.652 T:10236 debug : CPythonInvoker(8, C:\Users\stimp\AppData\Roaming\Kodi\addons\plugin.video.kayo.sports\default.py): script successfully run 2023-10-24 09:24:34.652 T:19092 debug : script.module.slyguy - Reading response from local path: C:\Users\stimp\AppData\Roaming\Kodi\cache\proxy.pluginrequest 2023-10-24 09:24:34.652 T:19092 info : script.module.slyguy - WV License response OK and returned data 2023-10-24 09:24:34.652 T:19092 debug : script.module.slyguy - RESPONSE OUT: plugin://plugin.video.kayo.sports/?=license_request (200) 2023-10-24 09:24:34.652 T:16792 debug : Curl::Debug - TEXT: Mark bundle as not supporting multiuse 2023-10-24 09:24:34.653 T:16792 debug : Curl::Debug - TEXT: HTTP 1.0, assume close after body 2023-10-24 09:24:34.653 T:16792 debug : Curl::Debug - HEADER_IN: HTTP/1.0 200 OK 2023-10-24 09:24:34.653 T:16792 debug : Curl::Debug - HEADER_IN: Server: BaseHTTP/0.6 Python/3.8.15 2023-10-24 09:24:34.653 T:16792 debug : Curl::Debug - HEADER_IN: Date: Mon, 23 Oct 2023 22:24:34 GMT 2023-10-24 09:24:34.653 T:16792 debug : Curl::Debug - HEADER_IN: content-length: 120 2023-10-24 09:24:34.653 T:16792 debug : Curl::Debug - TEXT: Closing connection 15 2023-10-24 09:24:34.671 T:16792 error : AddOnLog: inputstream.adaptive: WV_CencSingleSampleDecrypter::SendSessionMessage: License update not successful (no keys) 2023-10-24 09:24:34.671 T:16792 debug : AddOnLog: inputstream.adaptive: WV_CencSingleSampleDecrypter::CloseSessionId: Closing widevine session ID: BA06BB3D67119DFBBD6F7199DD7E8FCD 2023-10-24 09:24:34.682 T:16792 debug : AddOnLog: inputstream.adaptive: CDMMessage: 4 arrived! 2023-10-24 09:24:34.686 T:16792 debug : AddOnLog: inputstream.adaptive: WVCencSingleSampleDecrypter::CloseSessionId: Widevine session ID BA06BB3D67119DFBBD6F7199DD7E8FCD closed 2023-10-24 09:24:34.686 T:16792 error : AddOnLog: inputstream.adaptive: Initialize failed (SingleSampleDecrypter) 2023-10-24 09:24:34.686 T:16792 debug : AddOnLog: inputstream.adaptive: CSession::~CSession() 2023-10-24 09:24:34.701 T:16792 error : CVideoPlayer::OpenInputStream - error opening [plugin://plugin.video.kayo.sports/?=play&_play=1&id=53212&play_type=1&start_from=0&_is_live=1&_noresume=.pvr] 2023-10-24 09:24:34.702 T:16792 info : CVideoPlayer::OnExit() 2023-10-24 09:24:34.702 T:16792 debug : AddOnLog: inputstream.adaptive: Close() 2023-10-24 09:24:34.702 T:16792 debug : SECTION:UnloadDll(C:\Users\stimp\AppData\Roaming\Kodi\addons\inputstream.adaptive\inputstream.adaptive.dll) 2023-10-24 09:24:34.702 T:16792 info : ADDON: Dll Destroyed - InputStream Adaptive 2023-10-24 09:24:34.702 T:16792 debug : Thread VideoPlayer 16792 terminating

matthuisman commented 8 months ago

im guessing the license request is returning rubbish data / error.

xtreamjava commented 8 months ago

has anyone tried with Foxtel license server? just in case they are migrating service.

coxy86 commented 8 months ago

I just saw this on my Facebook feed. I wonder if this why Foxtel has introduced the Akamai bot blocking.

https://www.theaustralian.com.au/business/media/foxtel-unveils-its-new-hubbl-tv-technology-to-make-tv-viewing-much-smoother/news-story/1196107a10b9a615892744e5a4fc008a

liam8888999 commented 8 months ago

I wouldn’t be surprised On 27 Oct 2023, at 1:21 pm, coxy86 @.***> wrote: I just saw this on my Facebook feed. I wonder if this why Foxtel has introduced the Akamai bot blocking. https://www.theaustralian.com.au/business/media/foxtel-unveils-its-new-hubbl-tv-technology-to-make-tv-viewing-much-smoother/news-story/1196107a10b9a615892744e5a4fc008a

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

coxy86 commented 8 months ago

Team, I'm guessing there isn't much of an update on the foxtel/kayo/binge issues in Kodi. I haven't heard back from the ACCC, will post once they reply.

JCalvi commented 8 months ago

I've been playing with Bluestacks and Charles Proxy etc to see what should be sent and when, but it's a lot of work and not easy to work through ssl, sensor data etc. I suspect the headless browser version might be the easier path as this does most of the heavy lifting so might look into that again.

girkers commented 8 months ago

This is unfortunate.

I don't know if this is of any assistance, I have used both wireshark to generate a pcnag file and google chrome debug to generate a har file whilst watching an On-Demand stream.

Are these files any good or am I just dreaming that I can be of some small assistance?

guy99au commented 8 months ago

I cancelled my Kodi subscription. I now use Ace Stream for P2P sports channels in full HD, absolutely free. Screw Rupert.

liam8888999 commented 8 months ago

Has anyone come up with something to get the foxtel addon going

coxy86 commented 7 months ago

The ACCC finally replied to my enquiry. Bit of a blanket statement.

Thank you for writing to us about Foxtel. We have recorded the details of your report. We apologise for the delay in responding to you. Businesses are generally free to set their own terms and conditions, however businesses must not mislead consumer's about the products or services they are selling.

We can offer you information about your consumer rights and how to resolve a dispute with a business. Your next steps

If you’re unable to resolve your dispute by speaking with Foxtel, write them a complaint letter. That way they’re clearly aware of the problem, what you want, and you have a record of your contact. We have a complaint letter tool on our website to help you get started.

If writing to the business doesn’t resolve your dispute, we would suggest you contact Consumer Affairs Victoria. Unlike the ACCC, which focuses on broad and national issues, your local consumer protection agency may be able to help resolve your dispute by negotiating an outcome. Find out more about how to make a complaint to Consumer Affairs Victoria on its website.

If they’re unable to help, you may need to take your complaint to your state or territory small claims tribunal. Your rights: accurate information

The Australian Consumer Law provides consumers with the right to truthful and accurate representations when buying a product or service. This means that businesses must not mislead you with statements that are incorrect or likely to give you the wrong impression. This rule applies to information that a business provides you in any medium, including when talking to a sales representative, on packaging, in online shopping forums or social media.

If a business misleads you, and you experience loss, you might be entitled to a remedy.

You can read more about false or misleading claims on our website. Our advertising and selling guide is also a handy resource for businesses to ensure their advertising complies with the law.

Your report: what the ACCC does with this information

The ACCC uses reports from the public, as well as other sources of intelligence, to inform our enforcement work. You can read more about how we prioritise our work on our website.

Please note, the ACCC generally does not comment on our work or what we do with the information we receive from reports. We will only contact you again if we require further information.

To keep up-to-date on public announcements from the ACCC, you can subscribe to our email alerts.

We hope the information we have provided is helpful.

Yours sincerely

davecham76 commented 7 months ago

The thing that is screwing us is the very thing that caused the Optus networks to go down lol - not liking our chances because I am thinking that they don't dknow how to exclude devices like Kodi.

MiriNo1 commented 7 months ago

Hi, I'm only a user of the apps & found this forum while looking for solution to the issue. I wanted to add that prior to Matt's last updates a few days ago I had Kayo working @50% and was able to watch replays. After the updates a few days ago I can no longer get a replay to open, this info may or may not be of any use to you guys.

liam8888999 commented 7 months ago

I'm missing the Foxtel add-on. their website just doesn't even compare. I mean it doesn't even have rewind and you can only skip 10 seconds, hopefully they will open it up one day