- Use POST requests with the same body as official clients do;
- Update methods checking the client streaming URLs come from:
- Replace TVHTML5_SIMPLY_EMBEDDED_PLAYER by TVHTML5;
- Add WEB_EMBEDDED_PLAYER.
This internal class, YoutubeStreamHelper, has to be public in order to
be used by subpackages of the service's root one.
It supports poTokens, HTML5 signatureTimestamp property, embed context
and multiple InnerTube clients. It is meant to replace the
corresponding methods in YoutubeParsingHelper, in order to reduce the
class' size, code duplicates and improve its readability.
It adds a new way to get age-restricted videos' streams, the only ones
which are playable in YouTube embeds, which is not very common.
Also update client version and device info and add TVHTML5 client and
WEB_EMBEDDED_PLAYER constants, these will be used in the future.
TVHTML5_SIMPLY_EMBED_CLIENT_VERSION has been kept in its place as
the corresponding client does not work anonymously anymore, so it will
be removed soon.
DRM-protected streams have been added to some tracks, mostly from
major music companies. We do not support DRM streams in the extractor,
so they shouldn't be extracted and so waste time, energy and resources.
Extracting downloadable format requires login for a pretty long time,
so there is no point again to do requests to extract this stream to get
an unauthorized response.
Also send the track_authorization property returned in the track info,
like the website does and allow duplicate MP3 formats in progressive and
HLS delivery methods to be returned.
Implement a max number of requests per minute to prevent hitting reate limits and triggering ReCaptchaExceptions. This slows down the RecordingDownloader significantly and can be adjusted if needed. A request ist retried once when facing a ReCaptchaException.
Extractor.pageFetched -> Extractor.isPageFetched
Stream.equalStats(Stream) is renamed to Stream.areStatsEqual(Stream)
Stream.getBitrate() is renamed to Stream.getBitRate()