From fb2f37d223e4504a7bdb1e6fe1c107ffe4152369 Mon Sep 17 00:00:00 2001 From: TobiGr Date: Thu, 4 Mar 2021 21:21:37 +0100 Subject: [PATCH 1/2] [SoundCloud] Update hardcoded client id --- .../extractor/services/soundcloud/SoundcloudParsingHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudParsingHelper.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudParsingHelper.java index c9a49f694..1cb451761 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudParsingHelper.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudParsingHelper.java @@ -40,7 +40,7 @@ import static org.schabi.newpipe.extractor.ServiceList.SoundCloud; import static org.schabi.newpipe.extractor.utils.Utils.*; public class SoundcloudParsingHelper { - private static final String HARDCODED_CLIENT_ID = "H2c34Q0E7hftqnuDHGsk88DbNqhYpgMm"; // Updated on 24/06/20 + private static final String HARDCODED_CLIENT_ID = "Kl9G8jQT22DxqatQk09IjWRujGlut5Vd"; // Updated on 04/03/21 private static String clientId; private SoundcloudParsingHelper() { From 33594d4aff7ea372a9cc72d3c1c62a216b7e9989 Mon Sep 17 00:00:00 2001 From: TobiGr Date: Thu, 4 Mar 2021 21:28:22 +0100 Subject: [PATCH 2/2] [SoundCloud] Fix client id extraction SoundCloud changed their Javascript structure. That caused the client_id to be in the middle of the file (at byte ~43000 ). To have a little buffer, we now fetch the first 50000 bytes. --- .../extractor/services/soundcloud/SoundcloudParsingHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudParsingHelper.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudParsingHelper.java index 1cb451761..52e7fdae1 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudParsingHelper.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudParsingHelper.java @@ -67,7 +67,7 @@ public class SoundcloudParsingHelper { Collections.reverse(possibleScripts); final HashMap> headers = new HashMap<>(); - headers.put("Range", singletonList("bytes=0-16384")); + headers.put("Range", singletonList("bytes=0-50000")); for (Element element : possibleScripts) { final String srcUrl = element.attr("src");