Now YouTube returns just "{}" without any better explanation, so ParsingException is thrown by the extractor. Now users won't get told that the video they are trying to watch does not exist at all, but since YouTube literally provides an empty JSON response we have no way to detect if the video does not exist or if there is some other bug in the way we make requests that causes an empty response.
One of the tests had to be removed since I could not find a channel which has that message, and according to https://youtube.fandom.com/wiki/Termination#Ban_Messages that message is "deprecated" so maybe it does not exist anymore.
Playability status for the WEB client isn't checked anymore, as it
requires a valid signatureTimestamp from JavaScript player to avoid a
page reload error. Until we can get and use n parameter function
decoding for streaming URLs of HTML5 clients again and support SABR
streams, it doesn't really make sense to fetch a huge JavaScript player
just to get metadata.
Age-restricted content which can be watched with the embedded player is
also broken due to extraction failure and non-ability to run the n
parameter function, so fetching this embedded player has been also
removed and all age-restricted content will throw an
AgeRestrictedContentException.
Playability error status checks have been adapted, as mobile clients get
different error responses than the WEB client.
Some strings have been extracted into constants and a fallback for
unlisted privacy check has been added, in YoutubeStreamExtractor for
both points.
Fixes an issue, where shorts thumbnails where not extracted, as they're now
contained within a `thumbnailViewModel`, instead of a simple `thumbnail`
object.
Closes: https://github.com/TeamNewPipe/NewPipe/issues/12907
Extracts the `xtags` field, which encodes additional data of the format, such
as if the format is using dynamic range compression.
This is required for using SABR.
Fixes an issue, where for videos with multiple uploaders/collaborators, the
uploader URL could not be extracted, leading to the entire video failing to be
extracted. This is fixed by extracting the URL of the first collaborator, which
appears to be the main channel where the video is actually displayed.
Closes: https://github.com/TeamNewPipe/NewPipeExtractor/issues/1333
Style fix: remove trailing space at line 28
Update MAX_EMPTY_PAGES value to 3 with proper JDoc formatting
Add JavaDoc for MAX_EMPTY_PAGES
Rewite getPage method to internally handle emptyItems case