Skip to content

[YouTubeBridge] Fix for change to YouTube playlists - #5026

Merged
dvikan merged 3 commits into
RSS-Bridge:masterfrom
pg08972345:master
Aug 1, 2026
Merged

[YouTubeBridge] Fix for change to YouTube playlists#5026
dvikan merged 3 commits into
RSS-Bridge:masterfrom
pg08972345:master

Conversation

@pg08972345

@pg08972345 pg08972345 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

YouTube has made another change to the playlist pages, shifting around the ytInitialData JSON object structure. This adds cases for when the lockupViewModel objects are direct children of the itemSectionRenderer.

The ytInitialData JSON can also now be larger than 1 million characters in length for playlists with a large number of items (say over 90), exceeding the PCRE backtracking limit and causing the preg_match to fail and return 0 groups. I've added a workaround to temporarily increase the limit to 10 million just for the regex.

I've tested this on my local instance on a range of playlists and it all seems to be working fine for me now.
Fixes #5002

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

Pull request artifacts

Bridge Context Status
Youtube 1 By username (current) ✔️
Youtube 1 By username (pr) ✔️
Youtube 2 By channel id (current) ✔️
Youtube 2 By channel id (pr) ✔️
Youtube 3 By custom name (current) ✔️
Youtube 3 By custom name (pr) ✔️
Youtube 4 By playlist Id (current) Bridge returned error 0! (20639)
Type: ErrorException
Message: Undefined property: stdClass::$playlistVideoListRenderer
Youtube 4 By playlist Id (pr) ✔️
Youtube 5 Search result (current) ✔️
Youtube 5 Search result (pr) ✔️

last change: Sunday 2026-07-05 13:21:51

@TheJayMann

Copy link
Copy Markdown

If you mention in your pull request message that it fixes, closes, or resolves an issue, as mentioned in https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword, then, if/when this pull request gets merged in, the issue will automatically be closed without manually having to close afterwards. I don't know if I can do it myself as I did not open the pull request, but it would be done as the following line.
Fixes: #5002

@pg08972345

Copy link
Copy Markdown
Contributor Author

TIL. Thanks @TheJayMann I've updated the original PR note.

@polybjorn

Copy link
Copy Markdown
Contributor

Tested this on PHP 8.5 and it works. Playlists fail on master and come back correctly on your branch. The backtrack limit does get hit in practice too: LTT's uploads playlist has a 1.4 MB ytInitialData, which preg_match won't match at the default 1M. That part sits in extractJsonFromHtml, so it covers large payloads in every context, not just playlists.

phpcs fails though: line 431 is indented with a tab, and phpcbf fixes it. Looks like the lint workflow never ran on this PR, so it wouldn't have shown up.

@pg08972345

pg08972345 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

@polybjorn Thanks for that. Tab indent should be fixed now.

@dvikan
dvikan merged commit 08566e4 into RSS-Bridge:master Aug 1, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Youtube: Unable to find playlist, but it's there

4 participants