mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-31 15:23:00 +00:00 
			
		
		
		
	Fix addYoutubeCookies functions (Yt changed things lately)
This commit is contained in:
		| @@ -150,28 +150,17 @@ public class ReCaptchaActivity extends AppCompatActivity { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     private void addYoutubeCookies(@Nonnull String cookies) { |     private void addYoutubeCookies(@Nonnull String cookies) { | ||||||
|         String c_s_gl = ""; |         if (cookies.contains("s_gl=") || cookies.contains("goojf=") || cookies.contains("VISITOR_INFO1_LIVE=")) { | ||||||
|         String c_goojf = ""; |  | ||||||
|  |  | ||||||
|         String[] parts = cookies.split(";"); |  | ||||||
|         for (String part : parts) { |  | ||||||
|             String trimmedPart = part.trim(); |  | ||||||
|             if (trimmedPart.startsWith("s_gl")) { |  | ||||||
|                 c_s_gl = trimmedPart; |  | ||||||
|             } |  | ||||||
|             if (trimmedPart.startsWith("goojf")) { |  | ||||||
|                 c_goojf = trimmedPart; |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         if (c_s_gl.length() > 0 && c_goojf.length() > 0) { |  | ||||||
|             // addCookie(c_s_gl); |  | ||||||
|             // addCookie(c_goojf); |  | ||||||
|             // Youtube seems to also need the other cookies: |             // Youtube seems to also need the other cookies: | ||||||
|             addCookie(cookies); |             addCookie(cookies); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private void addCookie(String cookie) { |     private void addCookie(String cookie) { | ||||||
|  |         if (foundCookies.contains(cookie)) { | ||||||
|  |             return; | ||||||
|  |         } | ||||||
|  |  | ||||||
|         if (foundCookies.isEmpty() || foundCookies.endsWith("; ")) { |         if (foundCookies.isEmpty() || foundCookies.endsWith("; ")) { | ||||||
|             foundCookies += cookie; |             foundCookies += cookie; | ||||||
|         } else if (foundCookies.endsWith(";")) { |         } else if (foundCookies.endsWith(";")) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Stypox
					Stypox