Workaround YouTube bug causing the community tab to be empty #3318
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Workaround YouTube bug causing the community tab to be empty
Pull Request Type
Related issue
closes #3306
Description
For some channels YouTube will return responses for the community tab that only contain continuations, currently that means you have to click the load more button a couple of times before any posts show up. This pull request detects the only continuation responses and will automatically follow the continuations until it finds one with contents and then shows that.
While we can't know for sure what exactly is happening on YouTube's side to make this occur, my guess is that it might have something to do with them filtering out posts that are only visible to channel members/sponsors.
So what I think it probably happening, is that YouTube is getting a page/chunk of posts from their database, then filtering out the member only posts and the returning the filtered page/chunk as is. So if all recent posts have been member only, that would explain the empty continuations.
"Why doesn't this issue appear on the YouTube website?"
Well it actually does but due to YouTube's autoloading behaviour relying on the continutation being in the viewport, it actually ends up autoloading more until it reaches a continuation that has contents. So similar to what this pull request does, except that this pull request does it intentionally.
Testing
This pull request only fixes the local API, for Invidious a fix will need to be done on the Invidious side
https://youtube.com/@TheLinuxEXP/community
Desktop