Skip to content
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

[YouTube] Fix partial non-extraction of "No views" string in stream items #1029

Merged

Conversation

AudricV
Copy link
Member

@AudricV AudricV commented Feb 21, 2023

As the "No views" string is returned in the case there is no view on a YouTube video, a number cannot be parsed in this case, so -1 was returned, as the detection of this string was only made for the first value (viewCountText).

This string is now detected in all methods to get the view count of a stream item and the corresponding code has been refactored to reduce code duplication as much as possible.

@AudricV AudricV added bug Issue is related to a bug youtube service, https://www.youtube.com/ labels Feb 21, 2023
@AudricV AudricV force-pushed the yt_fix-no-views-extraction-playlist-items branch from ac9bb92 to 7bfddf7 Compare February 26, 2023 18:05
As the "No views" string is returned in the case there is no view on a video, a
number cannot be parsed in this case, so -1 was returned.

This string is now detected in all methods to get the view count of a stream.
This refactoring avoids code duplication as much as possible.
@AudricV AudricV force-pushed the yt_fix-no-views-extraction-playlist-items branch from 7bfddf7 to bd79b92 Compare February 27, 2023 09:28
@AudricV AudricV requested a review from Stypox February 27, 2023 09:34
@Stypox Stypox merged commit b129849 into TeamNewPipe:dev Mar 1, 2023
@AudricV AudricV deleted the yt_fix-no-views-extraction-playlist-items branch March 1, 2023 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug youtube service, https://www.youtube.com/
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants