Fix invalid yt url: signature tag name is not always "signature"
Thanks to @omarroth for the suggestion: see TeamNewPipe/NewPipeExtractor#155
This commit is contained in:
parent
d22786b817
commit
133cc032d9
|
@ -888,7 +888,7 @@ public class YoutubeStreamExtractor extends StreamExtractor {
|
||||||
String streamUrl = tags.get("url");
|
String streamUrl = tags.get("url");
|
||||||
// if video has a signature: decrypt it and add it to the url
|
// if video has a signature: decrypt it and add it to the url
|
||||||
if (tags.get("s") != null) {
|
if (tags.get("s") != null) {
|
||||||
streamUrl = streamUrl + "&signature=" + decryptSignature(tags.get("s"), decryptionCode);
|
streamUrl = streamUrl + "&" + tags.get("sp") + "=" + decryptSignature(tags.get("s"), decryptionCode);
|
||||||
}
|
}
|
||||||
urlAndItags.put(streamUrl, itagItem);
|
urlAndItags.put(streamUrl, itagItem);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue