[SoundCloud] Fix getting more comments

This commit is contained in:
TobiGr 2022-10-11 13:01:35 +02:00
parent a822e91909
commit 4d136599bd
1 changed files with 5 additions and 1 deletions

View File

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