mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-22 13:33:18 +02:00
new URI instead of new URL in tests, 2.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
package com.rarchives.ripme.tst.ripper.rippers;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
import com.rarchives.ripme.ripper.rippers.DynastyscansRipper;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
@@ -11,14 +12,14 @@ import org.junit.jupiter.api.Test;
|
||||
public class DynastyscansRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testRip() throws IOException {
|
||||
DynastyscansRipper ripper = new DynastyscansRipper(new URL("https://dynasty-scans.com/chapters/under_one_roof_ch01"));
|
||||
public void testRip() throws IOException, URISyntaxException {
|
||||
DynastyscansRipper ripper = new DynastyscansRipper(new URI("https://dynasty-scans.com/chapters/under_one_roof_ch01").toURL());
|
||||
testRipper(ripper);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetGID() throws IOException {
|
||||
DynastyscansRipper ripper = new DynastyscansRipper(new URL("https://dynasty-scans.com/chapters/under_one_roof_ch01"));
|
||||
Assertions.assertEquals("under_one_roof_ch01", ripper.getGID(new URL("https://dynasty-scans.com/chapters/under_one_roof_ch01")));
|
||||
public void testGetGID() throws IOException, URISyntaxException {
|
||||
DynastyscansRipper ripper = new DynastyscansRipper(new URI("https://dynasty-scans.com/chapters/under_one_roof_ch01").toURL());
|
||||
Assertions.assertEquals("under_one_roof_ch01", ripper.getGID(new URI("https://dynasty-scans.com/chapters/under_one_roof_ch01").toURL()));
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,8 @@
|
||||
package com.rarchives.ripme.tst.ripper.rippers;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
|
||||
import com.rarchives.ripme.ripper.rippers.EroShareRipper;
|
||||
@@ -14,46 +16,46 @@ public class EroShareRipperTest extends RippersTest {
|
||||
// single image posts
|
||||
@Test
|
||||
@Disabled("https://github.com/RipMeApp/ripme/issues/306 : EroShareRipper broken (even for eroshae links)")
|
||||
public void testImageEroshareFromRedditRip() throws IOException {
|
||||
RedditRipper ripper = new RedditRipper(new URL(
|
||||
"https://www.reddit.com/r/BestOfEroshare/comments/5z7foo/good_morning_who_likes_abstract_asian_artwork_f/"));
|
||||
public void testImageEroshareFromRedditRip() throws IOException, URISyntaxException {
|
||||
RedditRipper ripper = new RedditRipper(new URI(
|
||||
"https://www.reddit.com/r/BestOfEroshare/comments/5z7foo/good_morning_who_likes_abstract_asian_artwork_f/").toURL());
|
||||
testRipper(ripper);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled("https://github.com/RipMeApp/ripme/issues/306 : EroShareRipper broken (even for eroshae links)")
|
||||
public void testImageEroshareRip() throws IOException {
|
||||
EroShareRipper ripper = new EroShareRipper(new URL("https://eroshare.com/i/5j2qln3f"));
|
||||
public void testImageEroshareRip() throws IOException, URISyntaxException {
|
||||
EroShareRipper ripper = new EroShareRipper(new URI("https://eroshare.com/i/5j2qln3f").toURL());
|
||||
testRipper(ripper);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled("https://github.com/RipMeApp/ripme/issues/306 : EroShareRipper broken (even for eroshae links)")
|
||||
public void testImageEroshaeRip() throws IOException {
|
||||
EroShareRipper ripper = new EroShareRipper(new URL("https://eroshae.com/i/5j2qln3f"));
|
||||
public void testImageEroshaeRip() throws IOException, URISyntaxException {
|
||||
EroShareRipper ripper = new EroShareRipper(new URI("https://eroshae.com/i/5j2qln3f").toURL());
|
||||
testRipper(ripper);
|
||||
}
|
||||
|
||||
// video album post
|
||||
@Test
|
||||
@Disabled("https://github.com/RipMeApp/ripme/issues/306 : EroShareRipper broken (even for eroshae links)")
|
||||
public void testVideoAlbumFromRedditRip() throws IOException {
|
||||
EroShareRipper ripper = new EroShareRipper(new URL(
|
||||
"https://www.reddit.com/r/BestOfEroshare/comments/5vyfnw/asian_mf_heard_i_should_post_here_date_night_her/"));
|
||||
public void testVideoAlbumFromRedditRip() throws IOException, URISyntaxException {
|
||||
EroShareRipper ripper = new EroShareRipper(new URI(
|
||||
"https://www.reddit.com/r/BestOfEroshare/comments/5vyfnw/asian_mf_heard_i_should_post_here_date_night_her/").toURL());
|
||||
testRipper(ripper);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled("https://github.com/RipMeApp/ripme/issues/306 : EroShareRipper broken (even for eroshae links)")
|
||||
public void testVideoAlbumEroshareRip() throws IOException {
|
||||
EroShareRipper ripper = new EroShareRipper(new URL("https://eroshare.com/wqnl6f00"));
|
||||
public void testVideoAlbumEroshareRip() throws IOException, URISyntaxException {
|
||||
EroShareRipper ripper = new EroShareRipper(new URI("https://eroshare.com/wqnl6f00").toURL());
|
||||
testRipper(ripper);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled("https://github.com/RipMeApp/ripme/issues/306 : EroShareRipper broken (even for eroshae links)")
|
||||
public void testVideoAlbumEroshaeRip() throws IOException {
|
||||
EroShareRipper ripper = new EroShareRipper(new URL("https://eroshae.com/wqnl6f00"));
|
||||
public void testVideoAlbumEroshaeRip() throws IOException, URISyntaxException {
|
||||
EroShareRipper ripper = new EroShareRipper(new URI("https://eroshae.com/wqnl6f00").toURL());
|
||||
testRipper(ripper);
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,8 @@
|
||||
package com.rarchives.ripme.tst.ripper.rippers;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
import com.rarchives.ripme.ripper.rippers.ErofusRipper;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
@@ -11,15 +12,15 @@ import org.junit.jupiter.api.Test;
|
||||
public class ErofusRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Tag("flaky") // if url does not exist, erofusripper test ends in out of memory
|
||||
public void testRip() throws IOException {
|
||||
ErofusRipper ripper = new ErofusRipper(new URL("https://www.erofus.com/comics/be-story-club-comics/a-kiss/issue-1"));
|
||||
public void testRip() throws IOException, URISyntaxException {
|
||||
ErofusRipper ripper = new ErofusRipper(new URI("https://www.erofus.com/comics/be-story-club-comics/a-kiss/issue-1").toURL());
|
||||
testRipper(ripper);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testGetGID() throws IOException {
|
||||
ErofusRipper ripper = new ErofusRipper(new URL("https://www.erofus.com/comics/be-story-club-comics/a-kiss/issue-1"));
|
||||
Assertions.assertEquals("be-story-club-comics", ripper.getGID(new URL("https://www.erofus.com/comics/be-story-club-comics/a-kiss/issue-1")));
|
||||
public void testGetGID() throws IOException, URISyntaxException {
|
||||
ErofusRipper ripper = new ErofusRipper(new URI("https://www.erofus.com/comics/be-story-club-comics/a-kiss/issue-1").toURL());
|
||||
Assertions.assertEquals("be-story-club-comics", ripper.getGID(new URI("https://www.erofus.com/comics/be-story-club-comics/a-kiss/issue-1").toURL()));
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,8 @@
|
||||
package com.rarchives.ripme.tst.ripper.rippers;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
|
||||
import com.rarchives.ripme.ripper.rippers.ErotivRipper;
|
||||
@@ -9,22 +11,22 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
public class ErotivRipperTest extends RippersTest {
|
||||
@Test
|
||||
public void testGetGID() throws IOException {
|
||||
URL url = new URL("https://erotiv.io/e/1568314255");
|
||||
public void testGetGID() throws IOException, URISyntaxException {
|
||||
URL url = new URI("https://erotiv.io/e/1568314255").toURL();
|
||||
ErotivRipper ripper = new ErotivRipper(url);
|
||||
assert("1568314255".equals(ripper.getGID(url)));
|
||||
}
|
||||
|
||||
public void testRip() throws IOException {
|
||||
URL url = new URL("https://erotiv.io/e/1568314255");
|
||||
public void testRip() throws IOException, URISyntaxException {
|
||||
URL url = new URI("https://erotiv.io/e/1568314255").toURL();
|
||||
ErotivRipper ripper = new ErotivRipper(url);
|
||||
testRipper(ripper);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled("test or ripper broken")
|
||||
public void testGetURLsFromPage() throws IOException {
|
||||
URL url = new URL("https://erotiv.io/e/1568314255");
|
||||
public void testGetURLsFromPage() throws IOException, URISyntaxException {
|
||||
URL url = new URI("https://erotiv.io/e/1568314255").toURL();
|
||||
ErotivRipper ripper = new ErotivRipper(url);
|
||||
assert(1 == ripper.getURLsFromPage(ripper.getFirstPage()).size());
|
||||
}
|
||||
|
@@ -1,7 +1,8 @@
|
||||
package com.rarchives.ripme.tst.ripper.rippers;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
import com.rarchives.ripme.ripper.rippers.FemjoyhunterRipper;
|
||||
|
||||
@@ -9,9 +10,9 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
public class FemjoyhunterRipperTest extends RippersTest {
|
||||
@Test
|
||||
public void testRip() throws IOException {
|
||||
FemjoyhunterRipper ripper = new FemjoyhunterRipper(new URL(
|
||||
"https://www.femjoyhunter.com/alisa-i-got-nice-big-breasts-and-fine-ass-so-she-seems-to-be-a-hottest-brunette-5936/"));
|
||||
public void testRip() throws IOException, URISyntaxException {
|
||||
FemjoyhunterRipper ripper = new FemjoyhunterRipper(new URI(
|
||||
"https://www.femjoyhunter.com/alisa-i-got-nice-big-breasts-and-fine-ass-so-she-seems-to-be-a-hottest-brunette-5936/").toURL());
|
||||
testRipper(ripper);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user