Skip to content

Commit 133cc03

Browse files
committed
Fix invalid yt url: signature tag name is not always "signature"
Thanks to @omarroth for the suggestion: see #155
1 parent d22786b commit 133cc03

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ private Map<String, ItagItem> getItags(String encodedUrlMapKey, ItagItem.ItagTyp
888888
String streamUrl = tags.get("url");
889889
// if video has a signature: decrypt it and add it to the url
890890
if (tags.get("s") != null) {
891-
streamUrl = streamUrl + "&signature=" + decryptSignature(tags.get("s"), decryptionCode);
891+
streamUrl = streamUrl + "&" + tags.get("sp") + "=" + decryptSignature(tags.get("s"), decryptionCode);
892892
}
893893
urlAndItags.put(streamUrl, itagItem);
894894
}

0 commit comments

Comments
 (0)