Skip to content

Commit c34b5e3

Browse files
committed
[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").
1 parent 23fa31a commit c34b5e3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ public static String[] getYoutubeMusicKey()
853853
musicKey = getStringResultFromRegexArray(response, INNERTUBE_API_KEY_REGEXES, 1);
854854
musicClientName = Parser.matchGroup1(INNERTUBE_CLIENT_NAME_REGEX, response);
855855
} catch (final Exception e) {
856-
final String url = "https://music.youtube.com/";
856+
final String url = "https://music.youtube.com/?ucbcb=1";
857857
final Map<String, List<String>> headers = new HashMap<>();
858858
addCookieHeader(headers);
859859
final String html = getDownloader().get(url, headers).responseBody();

0 commit comments

Comments
 (0)