[Bug]: youtube playlist returns EMPTY_RESULT — playlist items moved from playlistVideoRenderer to lockupViewModel
Description
opencli youtube playlist returns EMPTY_RESULT for every public playlist I tried, while youtube whoami reports logged in and opencli doctor is all green.
The adapter's InnerTube call itself still works: POST /youtubei/v1/browse with browseId: "VL<playlistId>" returns HTTP 200 and the videos are in the payload. The item shape has changed, though. The adapter reads itemSectionRenderer.contents[0].playlistVideoListRenderer.contents, which no longer exists, so it gets []. The string playlistVideoRenderer does not appear anywhere in the response.
clis/youtube/playlist.js on main is identical to the 1.8.7 release, so this is not fixed on main yet.
Old → new field mapping (verified against live responses)
| Purpose | Current adapter reads | Response now has |
|---|---|---|
| Item list | itemSectionRenderer.contents[0].playlistVideoListRenderer.contents |
itemSectionRenderer.contents (items directly) |
| Item type | playlistVideoRenderer |
lockupViewModel with contentType: "LOCKUP_CONTENT_TYPE_VIDEO" |
| Video ID | videoId |
contentId |
| Title | title.runs[0].text |
metadata.lockupMetadataViewModel.title.content |
| Channel | shortBylineText.runs[0].text |
metadata.lockupMetadataViewModel.metadata.contentMetadataViewModel.metadataRows[0].metadataParts[0].text.content |
| Views / published | videoInfo.runs[0] / videoInfo.runs[2] |
metadataRows[1].metadataParts[0] / [1] → .text.content |
| Duration | lengthText.simpleText |
contentImage.thumbnailViewModel.overlays[].thumbnailBottomOverlayViewModel.badges[].thumbnailBadgeViewModel.text |
| Rank | index.simpleText |
no equivalent field seen; list position works |
| Continuation token | last item → continuationItemRenderer.continuationEndpoint.continuationCommand.token |
last item of itemSectionRenderer.contents → continuationItemViewModel.continuationCommand.innertubeCommand.continuationCommand.token |
| Continuation page items | onResponseReceivedActions[0].appendContinuationItemsAction.continuationItems |
unchanged path; items are lockupViewModel, last item is the next continuationItemViewModel |
Pitfall: two continuation tokens
sectionListRenderer.contents is now [itemSectionRenderer, continuationItemViewModel]. The continuationItemViewModel that sits beside itemSectionRenderer has a different token. Requesting it returns only responseContext and trackingParams, with no items. The token that actually pages through videos is the one in the last element of itemSectionRenderer.contents.
Verification of the new paths
- A 446-episode playlist (
PLrAXtmErZgOdP_8GztsuKi9nrraNbKKp4) pages as 100 / 100 / 100 / 100 / 46 using the inner token, giving 446 uniquecontentIds. That matches the count in the playlist header. - A 6-video playlist returns all 6 videos on the first page. Its continuation request returns no items.
Scope note
opencli youtube watch-later still succeeds on 1.8.7, and it uses the same extractPlaylistVideos helper. That surface presumably still returns playlistVideoRenderer, so the fix should probably accept both shapes rather than replace the old one.
Steps to Reproduce
opencli youtube whoami→logged_in: trueopencli youtube playlist PLrAXtmErZgOdP_8GztsuKi9nrraNbKKp4 -f json- See
EMPTY_RESULT. Other public playlists, such asPLAqhIrjkxbuWI23v9cThsA9GvCAUhRvKZ, fail the same way.
Expected Behavior
The command returns the playlist's videos with rank, title, channel, duration, views, published and url, and follows continuation up to --limit.
OpenCLI Version
1.8.7 (latest on npm). Browser Bridge extension 1.0.23.
Node.js Version
Other (v24.16.0)
Operating System
Linux
Logs / Screenshots
$ opencli youtube playlist PLrAXtmErZgOdP_8GztsuKi9nrraNbKKp4 --limit 5 -f json -v
ok: false
error:
code: EMPTY_RESULT
message: youtube playlist returned no data
help: The page structure may have changed, or you may need to log in
exitCode: 66
stack: |-
EmptyResultError: youtube playlist returned no data
at Object.func (file:///usr/lib/node_modules/@jackwener/opencli/clis/youtube/playlist.js:92:19)OPENCLI_DIAGNOSTIC=1 did not emit a RepairContext for this failure; stderr only contained the error block above.
Source: jackwener/OpenCLI