mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-26 23:10:34 +05:30
Merge pull request #804 from Stypox/fix-yt-music-mix
[YouTube] Fix music mixes in some countries
This commit is contained in:
commit
aa6b7272a4
@ -1085,10 +1085,13 @@ public class YoutubeParsingHelper {
|
||||
public static String extractCookieValue(final String cookieName,
|
||||
@Nonnull final Response response) {
|
||||
final List<String> cookies = response.responseHeaders().get("set-cookie");
|
||||
int startIndex;
|
||||
String result = "";
|
||||
if (cookies == null) {
|
||||
return EMPTY_STRING;
|
||||
}
|
||||
|
||||
String result = EMPTY_STRING;
|
||||
for (final String cookie : cookies) {
|
||||
startIndex = cookie.indexOf(cookieName);
|
||||
final int startIndex = cookie.indexOf(cookieName);
|
||||
if (startIndex != -1) {
|
||||
result = cookie.substring(startIndex + cookieName.length() + "=".length(),
|
||||
cookie.indexOf(";", startIndex));
|
||||
|
Loading…
x
Reference in New Issue
Block a user