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;
|
package com.rarchives.ripme.tst.ripper.rippers;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URL;
|
import java.net.URI;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
|
|
||||||
import com.rarchives.ripme.ripper.rippers.DynastyscansRipper;
|
import com.rarchives.ripme.ripper.rippers.DynastyscansRipper;
|
||||||
import org.junit.jupiter.api.Assertions;
|
import org.junit.jupiter.api.Assertions;
|
||||||
@@ -11,14 +12,14 @@ import org.junit.jupiter.api.Test;
|
|||||||
public class DynastyscansRipperTest extends RippersTest {
|
public class DynastyscansRipperTest extends RippersTest {
|
||||||
@Test
|
@Test
|
||||||
@Tag("flaky")
|
@Tag("flaky")
|
||||||
public void testRip() throws IOException {
|
public void testRip() throws IOException, URISyntaxException {
|
||||||
DynastyscansRipper ripper = new DynastyscansRipper(new URL("https://dynasty-scans.com/chapters/under_one_roof_ch01"));
|
DynastyscansRipper ripper = new DynastyscansRipper(new URI("https://dynasty-scans.com/chapters/under_one_roof_ch01").toURL());
|
||||||
testRipper(ripper);
|
testRipper(ripper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetGID() throws IOException {
|
public void testGetGID() throws IOException, URISyntaxException {
|
||||||
DynastyscansRipper ripper = new DynastyscansRipper(new URL("https://dynasty-scans.com/chapters/under_one_roof_ch01"));
|
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 URL("https://dynasty-scans.com/chapters/under_one_roof_ch01")));
|
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;
|
package com.rarchives.ripme.tst.ripper.rippers;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
|
||||||
import com.rarchives.ripme.ripper.rippers.EroShareRipper;
|
import com.rarchives.ripme.ripper.rippers.EroShareRipper;
|
||||||
@@ -14,46 +16,46 @@ public class EroShareRipperTest extends RippersTest {
|
|||||||
// single image posts
|
// single image posts
|
||||||
@Test
|
@Test
|
||||||
@Disabled("https://github.com/RipMeApp/ripme/issues/306 : EroShareRipper broken (even for eroshae links)")
|
@Disabled("https://github.com/RipMeApp/ripme/issues/306 : EroShareRipper broken (even for eroshae links)")
|
||||||
public void testImageEroshareFromRedditRip() throws IOException {
|
public void testImageEroshareFromRedditRip() throws IOException, URISyntaxException {
|
||||||
RedditRipper ripper = new RedditRipper(new URL(
|
RedditRipper ripper = new RedditRipper(new URI(
|
||||||
"https://www.reddit.com/r/BestOfEroshare/comments/5z7foo/good_morning_who_likes_abstract_asian_artwork_f/"));
|
"https://www.reddit.com/r/BestOfEroshare/comments/5z7foo/good_morning_who_likes_abstract_asian_artwork_f/").toURL());
|
||||||
testRipper(ripper);
|
testRipper(ripper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Disabled("https://github.com/RipMeApp/ripme/issues/306 : EroShareRipper broken (even for eroshae links)")
|
@Disabled("https://github.com/RipMeApp/ripme/issues/306 : EroShareRipper broken (even for eroshae links)")
|
||||||
public void testImageEroshareRip() throws IOException {
|
public void testImageEroshareRip() throws IOException, URISyntaxException {
|
||||||
EroShareRipper ripper = new EroShareRipper(new URL("https://eroshare.com/i/5j2qln3f"));
|
EroShareRipper ripper = new EroShareRipper(new URI("https://eroshare.com/i/5j2qln3f").toURL());
|
||||||
testRipper(ripper);
|
testRipper(ripper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Disabled("https://github.com/RipMeApp/ripme/issues/306 : EroShareRipper broken (even for eroshae links)")
|
@Disabled("https://github.com/RipMeApp/ripme/issues/306 : EroShareRipper broken (even for eroshae links)")
|
||||||
public void testImageEroshaeRip() throws IOException {
|
public void testImageEroshaeRip() throws IOException, URISyntaxException {
|
||||||
EroShareRipper ripper = new EroShareRipper(new URL("https://eroshae.com/i/5j2qln3f"));
|
EroShareRipper ripper = new EroShareRipper(new URI("https://eroshae.com/i/5j2qln3f").toURL());
|
||||||
testRipper(ripper);
|
testRipper(ripper);
|
||||||
}
|
}
|
||||||
|
|
||||||
// video album post
|
// video album post
|
||||||
@Test
|
@Test
|
||||||
@Disabled("https://github.com/RipMeApp/ripme/issues/306 : EroShareRipper broken (even for eroshae links)")
|
@Disabled("https://github.com/RipMeApp/ripme/issues/306 : EroShareRipper broken (even for eroshae links)")
|
||||||
public void testVideoAlbumFromRedditRip() throws IOException {
|
public void testVideoAlbumFromRedditRip() throws IOException, URISyntaxException {
|
||||||
EroShareRipper ripper = new EroShareRipper(new URL(
|
EroShareRipper ripper = new EroShareRipper(new URI(
|
||||||
"https://www.reddit.com/r/BestOfEroshare/comments/5vyfnw/asian_mf_heard_i_should_post_here_date_night_her/"));
|
"https://www.reddit.com/r/BestOfEroshare/comments/5vyfnw/asian_mf_heard_i_should_post_here_date_night_her/").toURL());
|
||||||
testRipper(ripper);
|
testRipper(ripper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Disabled("https://github.com/RipMeApp/ripme/issues/306 : EroShareRipper broken (even for eroshae links)")
|
@Disabled("https://github.com/RipMeApp/ripme/issues/306 : EroShareRipper broken (even for eroshae links)")
|
||||||
public void testVideoAlbumEroshareRip() throws IOException {
|
public void testVideoAlbumEroshareRip() throws IOException, URISyntaxException {
|
||||||
EroShareRipper ripper = new EroShareRipper(new URL("https://eroshare.com/wqnl6f00"));
|
EroShareRipper ripper = new EroShareRipper(new URI("https://eroshare.com/wqnl6f00").toURL());
|
||||||
testRipper(ripper);
|
testRipper(ripper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Disabled("https://github.com/RipMeApp/ripme/issues/306 : EroShareRipper broken (even for eroshae links)")
|
@Disabled("https://github.com/RipMeApp/ripme/issues/306 : EroShareRipper broken (even for eroshae links)")
|
||||||
public void testVideoAlbumEroshaeRip() throws IOException {
|
public void testVideoAlbumEroshaeRip() throws IOException, URISyntaxException {
|
||||||
EroShareRipper ripper = new EroShareRipper(new URL("https://eroshae.com/wqnl6f00"));
|
EroShareRipper ripper = new EroShareRipper(new URI("https://eroshae.com/wqnl6f00").toURL());
|
||||||
testRipper(ripper);
|
testRipper(ripper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
package com.rarchives.ripme.tst.ripper.rippers;
|
package com.rarchives.ripme.tst.ripper.rippers;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URL;
|
import java.net.URI;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
|
|
||||||
import com.rarchives.ripme.ripper.rippers.ErofusRipper;
|
import com.rarchives.ripme.ripper.rippers.ErofusRipper;
|
||||||
import org.junit.jupiter.api.Assertions;
|
import org.junit.jupiter.api.Assertions;
|
||||||
@@ -11,15 +12,15 @@ import org.junit.jupiter.api.Test;
|
|||||||
public class ErofusRipperTest extends RippersTest {
|
public class ErofusRipperTest extends RippersTest {
|
||||||
@Test
|
@Test
|
||||||
@Tag("flaky") // if url does not exist, erofusripper test ends in out of memory
|
@Tag("flaky") // if url does not exist, erofusripper test ends in out of memory
|
||||||
public void testRip() throws IOException {
|
public void testRip() throws IOException, URISyntaxException {
|
||||||
ErofusRipper ripper = new ErofusRipper(new URL("https://www.erofus.com/comics/be-story-club-comics/a-kiss/issue-1"));
|
ErofusRipper ripper = new ErofusRipper(new URI("https://www.erofus.com/comics/be-story-club-comics/a-kiss/issue-1").toURL());
|
||||||
testRipper(ripper);
|
testRipper(ripper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Tag("flaky")
|
@Tag("flaky")
|
||||||
public void testGetGID() throws IOException {
|
public void testGetGID() throws IOException, URISyntaxException {
|
||||||
ErofusRipper ripper = new ErofusRipper(new URL("https://www.erofus.com/comics/be-story-club-comics/a-kiss/issue-1"));
|
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 URL("https://www.erofus.com/comics/be-story-club-comics/a-kiss/issue-1")));
|
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;
|
package com.rarchives.ripme.tst.ripper.rippers;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
|
||||||
import com.rarchives.ripme.ripper.rippers.ErotivRipper;
|
import com.rarchives.ripme.ripper.rippers.ErotivRipper;
|
||||||
@@ -9,22 +11,22 @@ import org.junit.jupiter.api.Test;
|
|||||||
|
|
||||||
public class ErotivRipperTest extends RippersTest {
|
public class ErotivRipperTest extends RippersTest {
|
||||||
@Test
|
@Test
|
||||||
public void testGetGID() throws IOException {
|
public void testGetGID() throws IOException, URISyntaxException {
|
||||||
URL url = new URL("https://erotiv.io/e/1568314255");
|
URL url = new URI("https://erotiv.io/e/1568314255").toURL();
|
||||||
ErotivRipper ripper = new ErotivRipper(url);
|
ErotivRipper ripper = new ErotivRipper(url);
|
||||||
assert("1568314255".equals(ripper.getGID(url)));
|
assert("1568314255".equals(ripper.getGID(url)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testRip() throws IOException {
|
public void testRip() throws IOException, URISyntaxException {
|
||||||
URL url = new URL("https://erotiv.io/e/1568314255");
|
URL url = new URI("https://erotiv.io/e/1568314255").toURL();
|
||||||
ErotivRipper ripper = new ErotivRipper(url);
|
ErotivRipper ripper = new ErotivRipper(url);
|
||||||
testRipper(ripper);
|
testRipper(ripper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Disabled("test or ripper broken")
|
@Disabled("test or ripper broken")
|
||||||
public void testGetURLsFromPage() throws IOException {
|
public void testGetURLsFromPage() throws IOException, URISyntaxException {
|
||||||
URL url = new URL("https://erotiv.io/e/1568314255");
|
URL url = new URI("https://erotiv.io/e/1568314255").toURL();
|
||||||
ErotivRipper ripper = new ErotivRipper(url);
|
ErotivRipper ripper = new ErotivRipper(url);
|
||||||
assert(1 == ripper.getURLsFromPage(ripper.getFirstPage()).size());
|
assert(1 == ripper.getURLsFromPage(ripper.getFirstPage()).size());
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
package com.rarchives.ripme.tst.ripper.rippers;
|
package com.rarchives.ripme.tst.ripper.rippers;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URL;
|
import java.net.URI;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
|
|
||||||
import com.rarchives.ripme.ripper.rippers.FemjoyhunterRipper;
|
import com.rarchives.ripme.ripper.rippers.FemjoyhunterRipper;
|
||||||
|
|
||||||
@@ -9,9 +10,9 @@ import org.junit.jupiter.api.Test;
|
|||||||
|
|
||||||
public class FemjoyhunterRipperTest extends RippersTest {
|
public class FemjoyhunterRipperTest extends RippersTest {
|
||||||
@Test
|
@Test
|
||||||
public void testRip() throws IOException {
|
public void testRip() throws IOException, URISyntaxException {
|
||||||
FemjoyhunterRipper ripper = new FemjoyhunterRipper(new URL(
|
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/"));
|
"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);
|
testRipper(ripper);
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user