Skip to content

Commit cfdbc4e

Browse files
authored
Merge pull request #170 from TobiGr/dev
Fix SoundCloud playlists parsing exception
2 parents c64c90a + 0d09a9f commit cfdbc4e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/soundcloud/SoundcloudParsingHelper.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ public static String resolveIdWithEmbedPlayer(String url) throws IOException, Re
113113

114114
String response = NewPipe.getDownloader().download("https://w.soundcloud.com/player/?url="
115115
+ URLEncoder.encode(url, "UTF-8"));
116+
// handle playlists / sets different and get playlist id via uir field in JSON
117+
if (url.contains("sets") && !url.endsWith("sets") && !url.endsWith("sets/"))
118+
return Parser.matchGroup1("\"uri\":\\s*\"https:\\/\\/api\\.soundcloud\\.com\\/playlists\\/((\\d)*?)\"", response);
116119
return Parser.matchGroup1(",\"id\":(([^}\\n])*?),", response);
117120
}
118121

0 commit comments

Comments
 (0)