[YouTube] Fix retrieving the like count for videos with no likes#1439
Open
G-flat wants to merge 1 commit intoTeamNewPipe:devfrom
Open
[YouTube] Fix retrieving the like count for videos with no likes#1439G-flat wants to merge 1 commit intoTeamNewPipe:devfrom
G-flat wants to merge 1 commit intoTeamNewPipe:devfrom
Conversation
|
TobiGr
reviewed
Feb 22, 2026
...in/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java
Show resolved
Hide resolved
Contributor
|
could you add a test for a video that has 0 likes? |
Contributor
Author
|
I can, but I'm not sure if the video I choose will continue to stay at 0 likes over time. Do you think it would be better for me to write a test for a video that currently has 0 likes, or make a test that checks whether at least one of several videos, all currently with 0 likes, has no likes? |
Contributor
|
that's a good question. If you know multiple videos with zero likes it might be better to test that at least one of the has zero likes and the other's have a small, but positive like count. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.




My pull request follows @AudricV's suggestions in #1436 by rewriting
getLikeCount()to only use the logic fromparseLikeCountFromLikeButtonViewModel()and returning zero likes if a like count can't be extracted fromaccessibilityText.Fixes #1436 and fixes TeamNewPipe/NewPipe#13068.