Skip to content

plugins.kick: restore plugin with new HTTPAdapter #6024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 7, 2024

Conversation

bastimeyer
Copy link
Member

@bastimeyer bastimeyer commented Jun 6, 2024

Three commits:

  1. Add new test markers for excluding specific python versions
  2. Refactor custom HTTPAdapter classes, so urllib3's SSLContext can be customized easily
  3. Restore the plugin and use custom HTTPAdapter that disables the OP_NO_TICKET SSLContext option

See #6018 (comment)


Working plugin from this PR branch using OpenSSL 3.0.13

$ docker run --rm -it ghcr.io/streamlink/appimage-buildenv-x86_64@sha256:537b8ef991c77cc633d932654aff3372cf7b4c233bb775b5ba8aa191dface5b1 bash -c '/opt/python/cp312-cp312/bin/python -m venv /venv;source /venv/bin/activate;pip install -q git+https://github.com/bastimeyer/streamlink@plugins/kick/restore;streamlink -l debug kick.com/xqc'
[session][debug] Loading plugin: kick
[cli][info] streamlink is running as root! Be careful!
[cli][debug] OS:         Linux-6.9.2-1-git-x86_64-with-glibc2.17
[cli][debug] Python:     3.12.3
[cli][debug] OpenSSL:    OpenSSL 3.0.13 30 Jan 2024
[cli][debug] Streamlink: 6.7.3+41.g096d9701
[cli][debug] Dependencies:
[cli][debug]  certifi: 2024.6.2
[cli][debug]  isodate: 0.6.1
[cli][debug]  lxml: 5.2.2
[cli][debug]  pycountry: 24.6.1
[cli][debug]  pycryptodome: 3.20.0
[cli][debug]  PySocks: 1.7.1
[cli][debug]  requests: 2.32.3
[cli][debug]  trio: 0.25.1
[cli][debug]  trio-websocket: 0.11.1
[cli][debug]  typing-extensions: 4.12.1
[cli][debug]  urllib3: 2.2.1
[cli][debug]  websocket-client: 1.8.0
[cli][debug] Arguments:
[cli][debug]  url=kick.com/xqc
[cli][debug]  --loglevel=debug
[cli][info] Found matching plugin kick for URL kick.com/xqc
[utils.l10n][debug] Language code: en_US
Available streams: 160p (worst), 360p, 480p, 720p60, 1080p60 (best)

@Hakkin
Copy link
Contributor

Hakkin commented Jun 6, 2024

Working on Windows 10 with OpenSSL 3.0.11, also checked out the old patch and confirmed it returns 403 for me, so this fixes it on my end at least.

Refactor custom `HTTPAdapter` classes and add base `SSLContextAdapter`
class for being able to easily customize the `SSLContext` object
generated by urllib3 that is passed to the pool manager.
@bastimeyer bastimeyer force-pushed the plugins/kick/restore branch from fba104e to 4fa85c5 Compare June 6, 2024 21:28
@bastimeyer
Copy link
Member Author

bastimeyer commented Jun 6, 2024

When building AppImages, I'm getting

error: Unable to open URL: https://kick.com/ (HTTPSConnectionPool(host='kick.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))))

I'll have a look at this tomorrow...

solved:
streamlink/streamlink-appimage@bbc4a8f

@gravyboat
Copy link
Member

I know you solved this issue already but don't invest too much time in to it. A single plugin is not worth the implementation and maintenance hassle.

@bastimeyer bastimeyer merged commit c92c5fb into streamlink:master Jun 7, 2024
23 checks passed
@bastimeyer bastimeyer deleted the plugins/kick/restore branch June 7, 2024 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants