streamlink: plugins.kick: 403 Client Error: Forbidden for url
Checklist
- This is a plugin issue and not a different kind of issue
- I have read the contribution guidelines
- I have checked the list of open and recently closed plugin issues
- I have checked the commit log of the master branch
Streamlink version
streamlink 6.7.4+12.gbe04a5e
Description
Great thanks to @bastimeyer , Streamlink has finally added the support for kick.com and I couldn’t wait to have a test using the nightly build generated earlier today.
But unfortunately, it seems to have some bug while fetching the livestream and VOD. Both of them prompt an error like error: Unable to open URL: ... (403 Client Error: Forbidden for url: ... )
All livestreams and VODs have the same error, and I also tried to fetch with proxy in Japan/HK and it still prompts the same error, so it might not be a geo-blocking issue.
Debug log
[For livestreams]
streamlink --player "C:\Program Files (x86)\Pure Codec\x64\PotPlayerMini64.exe" --player-no-close --loglevel debug "https://kick.com/ryda" best
[cli][debug] OS: Windows 10
[cli][debug] Python: 3.12.3
[cli][debug] OpenSSL: OpenSSL 3.0.13 30 Jan 2024
[cli][debug] Streamlink: 6.7.4+12.gbe04a5e
[cli][debug] Dependencies:
[cli][debug] certifi: 2023.11.17
[cli][debug] isodate: 0.6.1
[cli][debug] lxml: 4.9.3
[cli][debug] pycountry: 22.3.5
[cli][debug] pycryptodome: 3.18.0
[cli][debug] PySocks: 1.7.1
[cli][debug] requests: 2.31.0
[cli][debug] trio: 0.22.2
[cli][debug] trio-websocket: 0.10.3
[cli][debug] typing-extensions: 4.10.0
[cli][debug] urllib3: 2.0.3
[cli][debug] websocket-client: 1.6.1
[cli][debug] Arguments:
[cli][debug] url=https://kick.com/ryda
[cli][debug] stream=['best']
[cli][debug] --loglevel=debug
[cli][debug] --player=C:\Program Files (x86)\Pure Codec\x64\PotPlayerMini64.exe
[cli][debug] --player-no-close=True
[cli][info] Found matching plugin kick for URL https://kick.com/ryda
error: Unable to open URL: https://kick.com/api/v2/channels/ryda/livestream (403 Client Error: Forbidden for url: https://kick.com/api/v2/channels/ryda/livestream)
[For VODs]
streamlink --player "C:\Program Files (x86)\Pure Codec\x64\PotPlayerMini64.exe" --player-no-close --loglevel debug "https://kick.com/video/489e98c0-8c56-4e4f-8ec1-364ff26095bd" best
[cli][debug] OS: Windows 10
[cli][debug] Python: 3.12.3
[cli][debug] OpenSSL: OpenSSL 3.0.13 30 Jan 2024
[cli][debug] Streamlink: 6.7.4+12.gbe04a5e
[cli][debug] Dependencies:
[cli][debug] certifi: 2023.11.17
[cli][debug] isodate: 0.6.1
[cli][debug] lxml: 4.9.3
[cli][debug] pycountry: 22.3.5
[cli][debug] pycryptodome: 3.18.0
[cli][debug] PySocks: 1.7.1
[cli][debug] requests: 2.31.0
[cli][debug] trio: 0.22.2
[cli][debug] trio-websocket: 0.10.3
[cli][debug] typing-extensions: 4.10.0
[cli][debug] urllib3: 2.0.3
[cli][debug] websocket-client: 1.6.1
[cli][debug] Arguments:
[cli][debug] url=https://kick.com/video/489e98c0-8c56-4e4f-8ec1-364ff26095bd
[cli][debug] stream=['best']
[cli][debug] --loglevel=debug
[cli][debug] --player=C:\Program Files (x86)\Pure Codec\x64\PotPlayerMini64.exe
[cli][debug] --player-no-close=True
[cli][info] Found matching plugin kick for URL https://kick.com/video/489e98c0-8c56-4e4f-8ec1-364ff26095bd
error: Unable to open URL: https://kick.com/api/v1/video/489e98c0-8c56-4e4f-8ec1-364ff26095bd (403 Client Error: Forbidden for url: https://kick.com/api/v1/video/489e98c0-8c56-4e4f-8ec1-364ff26095bd)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 20 (10 by maintainers)
Kick is filtering out specific HTTP clients depending on the TLS handshakes.
The issue is caused by using OpenSSL 3.2 and below.
Streamlink’s Windows builds and the AppImages both bundle OpenSSL 3.0. The Windows builds are based on CPython’s default build config (but built at
streamlink/python-windows-embed), which bundles pre-built OpenSSL binaries frompython/cpython-bin-deps. Similar thing for the AppImages, which bundle the pre-built Python env including OpenSSL from thepypa/manylinuxrepo / docker images. Themanylinux_2_28-based AppImages which will soon replace the currentmanylinux2014ones will even be based on OpenSSL 1.1.1k, because the manylinux maintainers simply rely on AlmaLinux patches.So yeah, I think it’s time to remove the plugin again, because we can’t make it work on all systems, especially those where we provide custom Python builds for. I don’t want to go down the rabbit hole and also maintain OpenSSL builds in those envs.
✔️ On my Arch Linux host system using OpenSSL 3.3.0:
✔️ On my macOS VM using OpenSSL 3.3.0:
❌ From Streamlink’s Windows builds using OpenSSL 3.0.13:
❌ From Streamlink’s AppImage buildenv docker images using OpenSSL 3.0.13:
❌ From the
manylinux_2_28_x86_64docker images using patched OpenSSL 1.1.1k builds:❌ Debian sid docker image using OpenSSL 3.2.2.
❌ OpenSUSE Tumbleweed docker image using OpenSSL 3.1.4
I tested and it successfully solved the problem. Thank you so much!
(I’m completely a newbie in Python, I added those codes first time by giving tabs at the top of each line to make indentation. Now I know it should be four spaces.)