2
0
mirror of https://github.com/TeamNewPipe/NewPipeExtractor synced 2025-08-31 14:26:14 +00:00

[YouTube] Workaround getting streaming URLs returning 403 HTTP response codes

Using the player parameters used to get stories seems to fix the issue, which
affects currently only certain countries such as UK.

This is a workaround and should be fixed in a better way (by changing the
InnerTube additional client used for videos or finding what is now required in
Android player requests).
This commit is contained in:
AudricV
2022-10-29 13:15:03 +02:00
parent 4bc90cd9d8
commit 60e97cd274

View File

@@ -981,6 +981,11 @@ public class YoutubeStreamExtractor extends StreamExtractor {
.value(CPN, androidCpn)
.value(CONTENT_CHECK_OK, true)
.value(RACY_CHECK_OK, true)
// Workaround getting streaming URLs which can return 403 HTTP response
// codes by using stories parameter for Android client requests
// This behavior only happen in certain countries such as UK as of
// 10.29.2022
.value("params", "8AEB")
.done())
.getBytes(StandardCharsets.UTF_8);