When the subscriber count extraction fails to find the Regex pattern,
a RegexException is thrown. This is not a fatal error in most cases,
for example when downloading the channel page in order to update the
user's subscriptions, and so the correct behavior is to return
UNKNOWN_SUBSCRIBER_COUNT.
Related issue: https://github.com/TeamNewPipe/NewPipe/issues/11353.
This bug comprises two issues: subscribers cannot be extracted for
channels with pronoun tags, and when the RegexException is thrown,
channel subscriptions will fail to update because the exception is
uncaught. This commit fixes the latter aspect of the issue.
This commit adds two new regular expressions to parse the n parameter function.
It also improves existing regular expressions by using the constant representing
multiple characters instead of adding the one or multiple characters
token manually in each regex for everything and not only function names.
It isn't required anymore and not used by extractor anymore since commit
5a6da5f43e, as the wrong page ID is used as a
visitor data (the VerifiedStatus value as a string).
The pattern to detect the channel ID was faulty and e.g. the ID detected for "https://kolektiva.media/video-channels/documentary_channel" was "a/video-channels" which is wrong. A new pattern is added to distinguish between URLs and potential IDs because IDs must not start with a "/" while IDs inside an URL must.
FixesTeamNewPipe/NewPipe#11369
As there are multiple show UI elements which share a lot of common data, a base
implementation, an abstract class named YoutubeBaseShowInfoItemExtractor, has
been created to handle common cases.
Also throw an exception when we cannot get the verified status of a channel in
YoutubeChannelExtractor due to a missing channelHeader, if the channel has no
channelAgeGateRenderer.
The runs object was computed twice in getTextFromObject and getUrlFromObject
methods, leading to unneeded search costs. This has been avoided by storing the
array in method variables.
This param used to throttle bandwidth of streaming URLs which have this
parameter when the correct value is not provided but it is not the case
anymore, as the streaming URLs return now an HTTP response code 403 in
this case.
This commits fixes extraction of the function name decoding the n parameter for
HTML5 clients' streaming URLs for YouTube base JavaScript player 3400486c.
Two new regexes have been added to the existing ones. All regexes and what they
extract has been documented.
- Fix typo in folder name of DescriptionTestPewdiepie test;
- Fix constant usage of DownloaderTestImpl as download implementation for
UnlistedTest and CCLicensed tests.
These changes work around an anti-bot token, for which its requirement is A/B
tested on the WEB client. In this test, streaming URLs of this client return
HTTP errors 403 if the token is not provided after some time.
It also allows to not fetch the JavaScript player for non-age restricted
videos, reducing data usage.
The TVHTML5 embed client is now only fetched in the case of age-restricted
videos.
The methods forceFetchAndroidClient and forceFetchIosClient of
YoutubeStreamExtractor have been removed, as they are now not needed anymore.
These changes also break the extraction of appropriate error states for private
and deleted videos and invalid video IDs.