Skip to content

webbrowser.cdp.devtools: update to v0.0.1359167 #6211

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

Conversation

bastimeyer
Copy link
Member

Resolves #6209
Closes #6210

This updates Streamlink's Chrome devtools protocol version from v0.0.1156692 (initialized last year with 81d2ff2) to v0.0.1359167, which fixes compatibility with recent Chromium versions.

$ ./script/generate-cdp.py fetch runtime input dom
Output: /home/basti/repos/streamlink/src/streamlink/webbrowser/cdp/devtools
Fetching latest tag from NPMJS
Latest tag: v0.0.1359167
Fetching https://github.com/ChromeDevTools/devtools-protocol/raw/v0.0.1359167/json/browser_protocol.json
Fetching https://github.com/ChromeDevTools/devtools-protocol/raw/v0.0.1359167/json/js_protocol.json
Parsing domains...
Writing output...
Generating module: Browser -> browser.py
Generating module: Debugger -> debugger.py
Generating module: DOM -> dom.py
Generating module: Emulation -> emulation.py
Generating module: Fetch -> fetch.py
Generating module: Input -> input_.py
Generating module: Inspector -> inspector.py
Generating module: IO -> io.py
Generating module: Network -> network.py
Generating module: Page -> page.py
Generating module: Runtime -> runtime.py
Generating module: Security -> security.py
Generating module: Target -> target.py

$ streamlink --no-config -l debug -p mpv --webbrowser-headless=true --twitch-purge-client-integrity --twitch-force-client-integrity twitch.tv/gorgc best
[cli][debug] OS:         Linux-6.11.0-1-git-x86_64-with-glibc2.40
[cli][debug] Python:     3.12.6
[cli][debug] OpenSSL:    OpenSSL 3.3.2 3 Sep 2024
[cli][debug] Streamlink: 6.10.0+45.g101a018e
[cli][debug] Dependencies:
[cli][debug]  certifi: 2024.8.30
[cli][debug]  isodate: 0.6.1
[cli][debug]  lxml: 5.3.0
[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.26.2
[cli][debug]  trio-websocket: 0.12.0.dev0
[cli][debug]  typing-extensions: 4.12.2
[cli][debug]  urllib3: 2.2.3
[cli][debug]  websocket-client: 1.8.0
[cli][debug] Arguments:
[cli][debug]  url=twitch.tv/gorgc
[cli][debug]  stream=['best']
[cli][debug]  --no-config=True
[cli][debug]  --loglevel=debug
[cli][debug]  --player=mpv
[cli][debug]  --webbrowser-headless=True
[cli][debug]  --twitch-force-client-integrity=True
[cli][debug]  --twitch-purge-client-integrity=True
[cli][info] Found matching plugin twitch for URL twitch.tv/gorgc
[plugins.twitch][debug] Getting live HLS streams for gorgc
[plugins.twitch][info] Removing cached client-integrity token...
[plugins.twitch][info] Acquiring new client-integrity token...
[webbrowser.webbrowser][info] Launching web browser: /usr/bin/chromium (headless=True)
[webbrowser.webbrowser][debug] Waiting for web browser process to terminate
[plugins.twitch][debug] {'adblock': False, 'geoblock_reason': '', 'hide_ads': False, 'server_ads': True, 'show_ads': True}
[utils.l10n][debug] Language code: en_US
[cli][info] Available streams: audio_only, 160p (worst), 360p, 480p, 720p60, 1080p60 (best)
[cli][info] Opening stream: 1080p60 (hls)
[cli][info] Starting player: mpv
[stream.hls][debug] Reloading playlist
[cli][debug] Pre-buffering 8192 bytes
[plugins.twitch][info] Detected advertisement break of 15 seconds
[stream.hls][debug] First Sequence: 0; Last Sequence: 2
[stream.hls][debug] Start offset: 0; Duration: None; Start Sequence: 0; End Sequence: None
[stream.hls][debug] Adding segment 0 to queue
[stream.hls][debug] Adding segment 1 to queue
[stream.hls][debug] Adding segment 2 to queue
[stream.hls][debug] Writing segment 0 to output
[stream.hls][debug] Segment 0 complete
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
[cli.output][debug] Opening subprocess: ['/home/basti/.local/bin/mpv', '--force-media-title=twitch.tv/gorgc', '-']
[stream.hls][debug] Writing segment 1 to output
[stream.hls][debug] Segment 1 complete
[stream.hls][debug] Writing segment 2 to output
[stream.hls][debug] Segment 2 complete
[cli][debug] Writing stream to output
[cli][info] Player closed
[stream.segmented][debug] Closing worker thread
[stream.segmented][debug] Closing writer thread
[cli][info] Stream ended
[cli][info] Closing currently open stream...

Domain selection: fetch runtime input dom
@bastimeyer bastimeyer merged commit cbd8122 into streamlink:master Sep 30, 2024
25 checks passed
@bastimeyer bastimeyer deleted the webbrowser/cdp/devtools/v0.0.1359167 branch September 30, 2024 10:58
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.

plugins.twitch: Failed acquiring client integrity token
1 participant