1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-25 23:06:22 +02:00

coomerPartyrippertest new URI instead of new URL

This commit is contained in:
soloturn
2023-11-18 05:12:33 +01:00
parent d82cae1b78
commit 4a61ff97e5

View File

@@ -8,18 +8,20 @@ import com.rarchives.ripme.ripper.rippers.CoomerPartyRipper;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
public class CoomerPartyRipperTest extends RippersTest {
@Test
public void testRip() throws IOException {
URL url = new URL("https://coomer.su/onlyfans/user/soogsx");
public void testRip() throws IOException, URISyntaxException {
URL url = new URI("https://coomer.su/onlyfans/user/soogsx").toURL();
CoomerPartyRipper ripper = new CoomerPartyRipper(url);
testRipper(ripper);
}
@Test
public void testUrlParsing() throws IOException {
public void testUrlParsing() throws IOException, URISyntaxException {
String expectedGid = "onlyfans_soogsx";
String[] urls = new String[]{
"https://coomer.su/onlyfans/user/soogsx", // normal url
@@ -29,7 +31,7 @@ public class CoomerPartyRipperTest extends RippersTest {
"https://coomer.party/onlyfans/user/soogsx", // alternate domain
};
for (String stringUrl : urls) {
URL url = new URL(stringUrl);
URL url = new URI(stringUrl).toURL();
CoomerPartyRipper ripper = new CoomerPartyRipper(url);
assertTrue(ripper.canRip(url));
assertEquals(expectedGid, ripper.getGID(url));