Merge pull request #943 from TeamNewPipe/fix/sc/comments

[SoundCloud] Fix getting more comments
This commit is contained in:
Tobi 2022-10-29 22:19:50 +02:00 committed by GitHub
commit 3d314169b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -11,7 +11,8 @@ public final class SoundcloudStreamLinkHandlerFactory extends LinkHandlerFactory
= new SoundcloudStreamLinkHandlerFactory();
private static final String URL_PATTERN = "^https?://(www\\.|m\\.)?soundcloud.com/[0-9a-z_-]+"
+ "/(?!(tracks|albums|sets|reposts|followers|following)/?$)[0-9a-z_-]+/?([#?].*)?$";
private static final String API_URL_PATTERN = "^https?://api-v2\\.soundcloud.com"
+ "/(tracks|albums|sets|reposts|followers|following)/([0-9a-z_-]+)/";
private SoundcloudStreamLinkHandlerFactory() {
}
@ -31,6 +32,9 @@ public final class SoundcloudStreamLinkHandlerFactory extends LinkHandlerFactory
@Override
public String getId(final String url) throws ParsingException {
if (Parser.isMatch(API_URL_PATTERN, url)) {
return Parser.matchGroup1(API_URL_PATTERN, url);
}
Utils.checkUrl(URL_PATTERN, url);
try {