[YouTube] Fix extraction of YouTube Music client version and API key when using YouTube Music's website in EU

Google returns now the consent page of YouTube for YouTube Music in EU, which can be also avoided by adding the ucbcb parameter to the URL with the value 1 ("?ucbcb=1").
This commit is contained in:
TiA4f8R 2022-05-15 11:20:06 +02:00
parent 23fa31a1ec
commit c34b5e3a8b
No known key found for this signature in database
GPG Key ID: E6D3E7F5949450DD
1 changed files with 1 additions and 1 deletions

View File

@ -853,7 +853,7 @@ public final class YoutubeParsingHelper {
musicKey = getStringResultFromRegexArray(response, INNERTUBE_API_KEY_REGEXES, 1);
musicClientName = Parser.matchGroup1(INNERTUBE_CLIENT_NAME_REGEX, response);
} catch (final Exception e) {
final String url = "https://music.youtube.com/";
final String url = "https://music.youtube.com/?ucbcb=1";
final Map<String, List<String>> headers = new HashMap<>();
addCookieHeader(headers);
final String html = getDownloader().get(url, headers).responseBody();