Skip to content

plugins.chzzk: add clips support #6389

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

Mehavoid
Copy link
Contributor

@Mehavoid Mehavoid commented Jan 8, 2025

Closes: #6333 before merging, would be cool resolve PR #6388.

./script/test-plugin-urls.py chzzk -m -i CHANNEL_ID -r CLIP_ID LeqAmSuEQy -r CLIP_ID R9BilMGLOS -r VIDEO_ID 5164033
:: https://chzzk.naver.com/clips/CLIP_ID
:::: 잘못된 contentId 입니다.
!! No streams found
:: https://chzzk.naver.com/clips/LeqAmSuEQy
::  720p, worst, best
::   {'id': 'LeqAmSuEQy', 'author': '독케익', 'category': None, 'title': '독카이저 만세!'}
:: https://chzzk.naver.com/clips/R9BilMGLOS
:::: This stream is for adults only
!! No streams found
:: https://chzzk.naver.com/video/5164033
::  144p, 720p, 1080p, worst, best
::   {'id': '5164033', 'author': '따효니', 'category': 'League_of_Legends', 'title': '생컨뒤풀이 롤내전 (얍얍, 플레임, 네클릿, 후추, 둥그레, 니니아, 달콤레나, 연리, 이춘향)'}
:: https://chzzk.naver.com/video/VIDEO_ID
:::: 잘못된 값을 입력했습니다.
!! No streams found

streamlink --no-config -l debug -o /dev/null https://chzzk.naver.com/clips/LeqAmSuEQy best
[cli][debug] OS:         Linux-5.4.0-196-generic-x86_64-with-glibc2.31
[cli][debug] Python:     3.9.5
[cli][debug] OpenSSL:    OpenSSL 1.1.1f  31 Mar 2020
[cli][debug] Streamlink: 7.1.1+14.gcb4c64a6.dirty
[cli][debug] Dependencies:
[cli][debug]  certifi: 2024.12.14
[cli][debug]  exceptiongroup: 1.1.1
[cli][debug]  isodate: 0.6.0
[cli][debug]  lxml: 4.7.1
[cli][debug]  pycountry: 22.1.10
[cli][debug]  pycryptodome: 3.9.9
[cli][debug]  PySocks: 1.7.1
[cli][debug]  requests: 2.31.0
[cli][debug]  trio: 0.22.2
[cli][debug]  trio-websocket: 0.11.1
[cli][debug]  urllib3: 2.0.6
[cli][debug]  websocket-client: 1.2.3
[cli][debug] Arguments:
[cli][debug]  url=https://chzzk.naver.com/clips/LeqAmSuEQy
[cli][debug]  stream=['best']
[cli][debug]  --no-config=True
[cli][debug]  --loglevel=debug
[cli][debug]  --output=/dev/null
[cli][info] Found matching plugin chzzk for URL https://chzzk.naver.com/clips/LeqAmSuEQy
[utils.l10n][debug] Language code: en_US
[stream.dash][debug] Available languages for DASH audio streams: NONE (using: n/a)
[cli][info] Available streams: 720p (worst, best)
[cli][info] Opening stream: 720p (dash)
[cli][info] Writing output to
/dev/null
[cli][debug] Checking file output
[stream.dash][debug] Opening DASH reader for: ('9EED5EEEFE2C8C7DC9E1F48A7A9A5CCDE677', None, '5e3e2d54-ccfd-11ef-9bea-48df37e2c058') - video/mp2t
[stream.dash.manifest][debug] Generating segment timeline for static playlist: ('9EED5EEEFE2C8C7DC9E1F48A7A9A5CCDE677', None, '5e3e2d54-ccfd-11ef-9bea-48df37e2c058')
[stream.dash][debug] video/mp2t segment 0: downloading (1970-01-01T00:00:00.000000Z / 2025-01-08T02:24:20.486922Z)
[stream.segmented][debug] Closing worker thread
[cli][debug] Pre-buffering 8192 bytes
[stream.dash][debug] video/mp2t segment 1: downloading (1970-01-01T00:00:00.000000Z / 2025-01-08T02:24:23.811130Z)
[stream.dash][debug] video/mp2t segment 0: completed
[cli][debug] Writing stream to output
[download] Written 1.80 MiB to /dev/null (0s)                                                                                                                                                                     [stream.dash][debug] video/mp2t segment 2: downloading (1970-01-01T00:00:00.000000Z / 2025-01-08T02:24:24.089662Z)
[stream.dash][debug] video/mp2t segment 1: completed
[download] Written 3.21 MiB to /dev/null (2s @ 1.83 MiB/s)                                                                                                                                                        [stream.dash][debug] video/mp2t segment 3: downloading (1970-01-01T00:00:00.000000Z / 2025-01-08T02:24:25.888028Z)
[stream.dash][debug] video/mp2t segment 2: completed
[download] Written 4.93 MiB to /dev/null (4s @ 1.23 MiB/s)                                                                                                                                                        [stream.dash][debug] video/mp2t segment 4: downloading (1970-01-01T00:00:00.000000Z / 2025-01-08T02:24:28.170853Z)
[stream.dash][debug] video/mp2t segment 3: completed
[download] Written 6.66 MiB to /dev/null (5s @ 1.40 MiB/s)                                                                                                                                                        [stream.dash][debug] video/mp2t segment 5: downloading (1970-01-01T00:00:00.000000Z / 2025-01-08T02:24:28.945152Z)
[stream.dash][debug] video/mp2t segment 4: completed
[download] Written 8.38 MiB to /dev/null (5s @ 1.59 MiB/s)                                                                                                                                                        [stream.dash][debug] video/mp2t segment 6: downloading (1970-01-01T00:00:00.000000Z / 2025-01-08T02:24:29.578165Z)
[stream.dash][debug] video/mp2t segment 5: completed
[download] Written 10.14 MiB to /dev/null (6s @ 1.76 MiB/s)                                                                                                                                                       [stream.dash][debug] video/mp2t segment 6: completed
[stream.segmented][debug] Closing writer thread
[download] Written 11.08 MiB to /dev/null (6s @ 1.91 MiB/s)
[cli][info] Stream ended
[cli][info] Closing currently open stream...

@Mehavoid Mehavoid force-pushed the plugins/chzzk/add-clips-support branch from cb4c64a to 9aaec63 Compare January 8, 2025 02:35
Copy link
Member

@bastimeyer bastimeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

Please remove the unrelated commit from the PR branch.

@bastimeyer bastimeyer added the plugin enhancement A new feature for a working Plugin label Jan 8, 2025
@Mehavoid Mehavoid force-pushed the plugins/chzzk/add-clips-support branch from 9aaec63 to 8344edc Compare January 8, 2025 15:39
@Mehavoid Mehavoid force-pushed the plugins/chzzk/add-clips-support branch from 8344edc to 8da34ae Compare January 8, 2025 16:20
Copy link
Member

@bastimeyer bastimeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes should be fine now. The order of returned tuple items in get_videos() and get_clips() is now different from get_live_detail(), but that's not a big deal. If you want to change and revert it to the previous order for the sake of consistency, you can do that, otherwise I'm going to merge the PR.

Thanks.

@Mehavoid
Copy link
Contributor Author

Mehavoid commented Jan 8, 2025

I think I'll leave the order as it is for now.

@bastimeyer bastimeyer merged commit 3ec1849 into streamlink:master Jan 8, 2025
16 checks passed
@xueli12
Copy link

xueli12 commented Jan 8, 2025

Esteemed expert, might I inquire as to how this API was discovered? https://api.chzzk.naver.com/service/v1/play-info/clip/{clip_id} Upon opening https://chzzk.naver.com/clips/LeqAmSuEQy in Google Chrome, I did not observe this API within the devtools. The only APIs of this nature that I encountered were: https://api.chzzk.naver.com/service/v1/clips/vDHdB5Jfl1/detail?optionalProperties=COMMENT&optionalProperties=PRIVATE_USER_BLOCK&optionalProperties=PENALTY&optionalProperties=MAKER_CHANNEL&optionalProperties=OWNER_CHANNEL. I eagerly await your response.

@Mehavoid Mehavoid deleted the plugins/chzzk/add-clips-support branch January 10, 2025 10:26
@Mehavoid
Copy link
Contributor Author

@xueli12
Copy link

xueli12 commented Jan 10, 2025

@xueli12 https://chzzk.naver.com/embed/clip/LeqAmSuEQy

Is this link obtained by visiting https://chzzk.naver.com/clips/1niF8oNcXt and then clicking the share button?Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin enhancement A new feature for a working Plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

plugins.chzzk: Request to add the feature for downloading clips
3 participants