2
0
mirror of https://github.com/TeamNewPipe/NewPipeExtractor synced 2025-08-30 13:57:46 +00:00

Merge pull request #170 from TobiGr/dev

Fix SoundCloud playlists parsing exception
This commit is contained in:
Tobias Groza
2019-06-26 01:02:34 +02:00
committed by GitHub

View File

@@ -113,6 +113,9 @@ public class SoundcloudParsingHelper {
String response = NewPipe.getDownloader().download("https://w.soundcloud.com/player/?url="
+ URLEncoder.encode(url, "UTF-8"));
// handle playlists / sets different and get playlist id via uir field in JSON
if (url.contains("sets") && !url.endsWith("sets") && !url.endsWith("sets/"))
return Parser.matchGroup1("\"uri\":\\s*\"https:\\/\\/api\\.soundcloud\\.com\\/playlists\\/((\\d)*?)\"", response);
return Parser.matchGroup1(",\"id\":(([^}\\n])*?),", response);
}