Fetch again the desktop player JSON only if the content is protected by signatureCiphers

This commit is contained in:
TiA4f8R 2021-05-31 19:35:31 +02:00
parent 7474049fd1
commit 947baec805
No known key found for this signature in database
GPG key ID: E6D3E7F5949450DD

View file

@ -832,7 +832,7 @@ public class YoutubeStreamExtractor extends StreamExtractor {
// The cipher signatures from the player endpoint without a timestamp are invalid so
// download it again only if we didn't have a signatureTimestamp before fetching the
// data of this video (the sts string).
if (!stsKnown) {
if (!stsKnown && isCipherProtectedContent()) {
sts = getStsFromPlayerJs();
final JsonObject playerResponseWithSignatureTimestamp = getJsonPostResponse(
"player", createPlayerBodyWithSts(localization, contentCountry, videoId),