[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:
parent
23fa31a1ec
commit
c34b5e3a8b
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue