[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).
pull/960/head
AudricV 2022-10-29 13:15:03 +02:00
rodzic 4bc90cd9d8
commit 60e97cd274
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: DA92EC7905614198
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -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);