@Override public String getId(String url) throws ParsingException { Utils.checkUrl(URL_PATTERN, url); try { return SoundcloudParsingHelper.resolveIdWithEmbedPlayer(url); } catch (Exception e) { throw new ParsingException(e.getMessage(), e); } }
@Override public String getId(String url) throws ParsingException { Utils.checkUrl(URL_PATTERN, url); try { return SoundcloudParsingHelper.resolveIdWithEmbedPlayer(url); } catch (Exception e) { throw new ParsingException(e.getMessage(), e); } }
@Override public String getId(String url) throws ParsingException { Utils.checkUrl(URL_PATTERN, url); try { return SoundcloudParsingHelper.resolveIdWithEmbedPlayer(url); } catch (Exception e) { throw new ParsingException("Could not get id of url: " + url + " " + e.getMessage(), e); } }
@Test public void resolveIdWithEmbedPlayerTest() throws Exception { Assert.assertEquals("26057743", SoundcloudParsingHelper.resolveIdWithEmbedPlayer("https://soundcloud.com/trapcity")); Assert.assertEquals("16069159", SoundcloudParsingHelper.resolveIdWithEmbedPlayer("https://soundcloud.com/nocopyrightsounds")); }