nonvegan / streamlink-plugin-kick

Streamlink plugin for Kick.com
BSD 2-Clause "Simplified" License
40 stars 4 forks source link

error: No playable streams found #8

Closed moo-the-cow closed 10 months ago

moo-the-cow commented 11 months ago

using the windows version installed the libs and also into the correct target plus put the plugin into the correct folder. are there any known issues at the moment? this is the verbose output (I obfuscated the streamer url)

[20:20:11.394061][cli][debug] OS:         Windows 10
[20:20:11.394061][cli][debug] Python:     3.8.17
[20:20:11.395060][cli][debug] Streamlink: 6.0.0
[20:20:11.395060][cli][debug] Dependencies:
[20:20:11.412211][cli][debug]  certifi: 2023.5.7
[20:20:11.419262][cli][debug]  isodate: 0.6.1
[20:20:11.426285][cli][debug]  lxml: 4.9.3
[20:20:11.437777][cli][debug]  pycountry: 22.3.5
[20:20:11.446290][cli][debug]  pycryptodome: 3.18.0
[20:20:11.455876][cli][debug]  PySocks: 1.7.1
[20:20:11.457381][cli][debug]  requests: 2.31.0
[20:20:11.464903][cli][debug]  trio: 0.22.2
[20:20:11.473922][cli][debug]  trio-websocket: 0.10.3
[20:20:11.480437][cli][debug]  typing-extensions: 4.7.1
[20:20:11.489371][cli][debug]  urllib3: 2.0.3
[20:20:11.501270][cli][debug]  websocket-client: 1.6.1
[20:20:11.502274][cli][debug] Arguments:
[20:20:11.502274][cli][debug]  url=https://kick.com/xxxxxxxxxx
[20:20:11.502274][cli][debug]  stream=['best']
[20:20:11.502274][cli][debug]  --loglevel=all
[20:20:11.502274][cli][debug]  --output=xxxxxxxxxx.mkv
[20:20:11.503271][cli][info] Found matching plugin kick for URL https://kick.com/xxxxxxxxxx
[20:20:11.607985][plugins.kick][debug] Unable to validate result: ValidationError:
  Unable to parse JSON: Expecting value: line 1 column 1 (char 0) ('<!DOCTYPE html><html lang="en-US"> ...)
error: No playable streams found on this URL: https://kick.com/xxxxxxxxxx
moo-the-cow commented 11 months ago

I mean it is clear that there is no correct json response, I suspect some 404 error page is shown, but I know too little about the parsing library. Thank you for your time

Aetherlight commented 11 months ago

I've also been getting this JSON error. not always though. it might work for a while, then I try another stream and it won't work, then I try it again the next day it does work.

is there anything we can do to supply samples of the data we're receiving?

tried the following streams a few minutes ago (I don't watch any of these but I thought they would be good examples):

kick.com/devour kick.com/xqc kick.com/destiny kick.com/yassuo

(I noticed my streamlink and websocket-client are out of date compared to previous report, I'll update them but I doubt it matters)

[02:14:33.026134][cli][debug] OS:         Windows 10
[02:14:33.027134][cli][debug] Python:     3.11.3
[02:14:33.028134][cli][debug] Streamlink: 5.5.1
[02:14:33.029135][cli][debug] Dependencies:
[02:14:33.031134][cli][debug]  certifi: 2023.5.7
[02:14:33.032141][cli][debug]  isodate: 0.6.1
[02:14:33.033133][cli][debug]  lxml: 4.9.2
[02:14:33.035133][cli][debug]  pycountry: 22.3.5
[02:14:33.036133][cli][debug]  pycryptodome: 3.18.0
[02:14:33.037133][cli][debug]  PySocks: 1.7.1
[02:14:33.039131][cli][debug]  requests: 2.31.0
[02:14:33.040131][cli][debug]  urllib3: 2.0.2
[02:14:33.041130][cli][debug]  websocket-client: 1.5.2
[02:14:33.056126][cli][debug] Arguments:
[02:14:33.056126][cli][debug]  url=kick.com/devour
[02:14:33.057125][cli][debug]  --loglevel=all
[02:14:33.058125][cli][debug]  --player="C:\Program Files\MPC-HC\mpc-hc64.exe"
[02:14:33.058125][cli][debug]  --ffmpeg-ffmpeg=C:\Streamlink\ffmpeg\ffmpeg.exe
[02:14:33.059126][cli][info] Found matching plugin kick for URL kick.com/devour
[02:14:33.219220][plugins.kick][debug] Unable to validate result: ValidationError:
  Unable to parse JSON: Expecting value: line 1 column 1 (char 0) ('<!DOCTYPE html><html lang="en-US"> ...)
error: No playable streams found on this URL: kick.com/devour
seba11 commented 10 months ago

I've also been getting this JSON error. not always though. it might work for a while, then I try another stream and it won't work, then I try it again the next day it does work.

is there anything we can do to supply samples of the data we're receiving?

tried the following streams a few minutes ago (I don't watch any of these but I thought they would be good examples):

kick.com/devour kick.com/xqc kick.com/destiny kick.com/yassuo

(I noticed my streamlink and websocket-client are out of date compared to previous report, I'll update them but I doubt it matters)

[02:14:33.026134][cli][debug] OS:         Windows 10
[02:14:33.027134][cli][debug] Python:     3.11.3
[02:14:33.028134][cli][debug] Streamlink: 5.5.1
[02:14:33.029135][cli][debug] Dependencies:
[02:14:33.031134][cli][debug]  certifi: 2023.5.7
[02:14:33.032141][cli][debug]  isodate: 0.6.1
[02:14:33.033133][cli][debug]  lxml: 4.9.2
[02:14:33.035133][cli][debug]  pycountry: 22.3.5
[02:14:33.036133][cli][debug]  pycryptodome: 3.18.0
[02:14:33.037133][cli][debug]  PySocks: 1.7.1
[02:14:33.039131][cli][debug]  requests: 2.31.0
[02:14:33.040131][cli][debug]  urllib3: 2.0.2
[02:14:33.041130][cli][debug]  websocket-client: 1.5.2
[02:14:33.056126][cli][debug] Arguments:
[02:14:33.056126][cli][debug]  url=kick.com/devour
[02:14:33.057125][cli][debug]  --loglevel=all
[02:14:33.058125][cli][debug]  --player="C:\Program Files\MPC-HC\mpc-hc64.exe"
[02:14:33.058125][cli][debug]  --ffmpeg-ffmpeg=C:\Streamlink\ffmpeg\ffmpeg.exe
[02:14:33.059126][cli][info] Found matching plugin kick for URL kick.com/devour
[02:14:33.219220][plugins.kick][debug] Unable to validate result: ValidationError:
  Unable to parse JSON: Expecting value: line 1 column 1 (char 0) ('<!DOCTYPE html><html lang="en-US"> ...)
error: No playable streams found on this URL: kick.com/devour

It's because of cloudflare antibot. HTML response is a cloudflare security method to block access for bots. Sometimes it works better sometimes nah.

The solution might be use the nodejs with cloudscraper.

moo-the-cow commented 10 months ago

well I used python cloudscraper exactly as suggested for setup. elaborate on nodejs?

seba11 commented 10 months ago

well I used python cloudscraper exactly as suggested for setup. elaborate on nodejs?

You need to change js interpreter for cloudscraper in script just like this: https://github.com/VeNoMouS/cloudscraper#javascript-engines-and-interpreters Don't know if it help, but might be a solution. Of course you need to have nodejs installed.

moo-the-cow commented 10 months ago

ok, I think I will keep it open until kick is doing better (they are not really developer friendly). when they are it probably needs re-work and then we can close the issue in my opinion.

seba11 commented 10 months ago

OK the solution is to use https://github.com/lwthiker/curl-impersonate instead cloudcraper. I tested it and it works very well with kick. Similar project https://github.com/park-onezero/streamlink-plugin-kick-advanced also using it and works well.

moo-the-cow commented 10 months ago

that's great! thank you for the updates! I will close the issue now. depending on which implementation will get updates more frequently I decide which one to use (personally). Good to have options. I will try both