1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-21 21:15:19 +02:00

new URI instead of new URL in tests, 10.

This commit is contained in:
soloturn
2023-06-13 07:43:41 +02:00
parent 874c565c56
commit 589d7eb5a5
9 changed files with 93 additions and 77 deletions

View File

@@ -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.PornhubRipper; import com.rarchives.ripme.ripper.rippers.PornhubRipper;
@@ -13,26 +15,26 @@ import org.junit.jupiter.api.Test;
public class PornhubRipperTest extends RippersTest { public class PornhubRipperTest extends RippersTest {
@Test @Test
public void testPornhubRip() throws IOException { public void testPornhubRip() throws IOException, URISyntaxException {
if (Utils.getConfigBoolean("test.run_flaky_tests", false)) { if (Utils.getConfigBoolean("test.run_flaky_tests", false)) {
PornhubRipper ripper = new PornhubRipper(new URL("https://www.pornhub.com/album/15680522")); PornhubRipper ripper = new PornhubRipper(new URI("https://www.pornhub.com/album/15680522").toURL());
testRipper(ripper); testRipper(ripper);
} }
} }
public void testGetGID() throws IOException { public void testGetGID() throws IOException, URISyntaxException {
URL url = new URL("https://www.pornhub.com/album/15680522?page=2"); URL url = new URI("https://www.pornhub.com/album/15680522?page=2").toURL();
PornhubRipper ripper = new PornhubRipper(url); PornhubRipper ripper = new PornhubRipper(url);
Assertions.assertEquals("15680522", ripper.getGID(url)); Assertions.assertEquals("15680522", ripper.getGID(url));
url = new URL("https://www.pornhub.com/album/15680522"); url = new URI("https://www.pornhub.com/album/15680522").toURL();
Assertions.assertEquals("15680522", ripper.getGID(url)); Assertions.assertEquals("15680522", ripper.getGID(url));
} }
@Test @Test
@Tag("flaky") @Tag("flaky")
public void testGetNextPage() throws IOException { public void testGetNextPage() throws IOException, URISyntaxException {
String baseURL = "https://www.pornhub.com/album/30687901"; String baseURL = "https://www.pornhub.com/album/30687901";
PornhubRipper ripper = new PornhubRipper(new URL(baseURL)); PornhubRipper ripper = new PornhubRipper(new URI(baseURL).toURL());
Document page = Http.url(baseURL).get(); Document page = Http.url(baseURL).get();
int numPagesRemaining = 1; int numPagesRemaining = 1;
for (int idx = 0; idx < numPagesRemaining; idx++){ for (int idx = 0; idx < numPagesRemaining; idx++){

View File

@@ -2,7 +2,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.RedditRipper; import com.rarchives.ripme.ripper.rippers.RedditRipper;
@@ -14,23 +15,23 @@ public class RedditRipperTest extends RippersTest {
@Test @Test
@Tag("flaky") // https://github.com/RipMeApp/ripme/issues/253 @Tag("flaky") // https://github.com/RipMeApp/ripme/issues/253
public void testRedditSubredditRip() throws IOException { public void testRedditSubredditRip() throws IOException, URISyntaxException {
RedditRipper ripper = new RedditRipper(new URL("http://www.reddit.com/r/nsfw_oc")); RedditRipper ripper = new RedditRipper(new URI("http://www.reddit.com/r/nsfw_oc").toURL());
testRipper(ripper); testRipper(ripper);
} }
@Test @Test
@Tag("flaky") // https://github.com/RipMeApp/ripme/issues/253 @Tag("flaky") // https://github.com/RipMeApp/ripme/issues/253
public void testRedditSubredditTopRip() throws IOException { public void testRedditSubredditTopRip() throws IOException, URISyntaxException {
RedditRipper ripper = new RedditRipper(new URL("http://www.reddit.com/r/nsfw_oc/top?t=all")); RedditRipper ripper = new RedditRipper(new URI("http://www.reddit.com/r/nsfw_oc/top?t=all").toURL());
testRipper(ripper); testRipper(ripper);
} }
@Test @Test
@Disabled @Disabled
public void testRedditPostRip() throws IOException { public void testRedditPostRip() throws IOException, URISyntaxException {
RedditRipper ripper = new RedditRipper( RedditRipper ripper = new RedditRipper(
new URL("http://www.reddit.com/r/UnrealGirls/comments/1ziuhl/in_class_veronique_popa/")); new URI("http://www.reddit.com/r/UnrealGirls/comments/1ziuhl/in_class_veronique_popa/").toURL());
testRipper(ripper); testRipper(ripper);
} }
@@ -41,25 +42,25 @@ public class RedditRipperTest extends RippersTest {
*/ */
@Test @Test
@Tag("flaky") @Tag("flaky")
public void testRedditGfyGoodURL() throws IOException { public void testRedditGfyGoodURL() throws IOException, URISyntaxException {
RedditRipper ripper = new RedditRipper( RedditRipper ripper = new RedditRipper(
new URL("https://www.reddit.com/r/bottesting/comments/7msozf/good_link/")); new URI("https://www.reddit.com/r/bottesting/comments/7msozf/good_link/").toURL());
testRipper(ripper); testRipper(ripper);
} }
@Test @Test
@Tag("flaky") @Tag("flaky")
public void testSelfPostRip() throws IOException { public void testSelfPostRip() throws IOException, URISyntaxException {
RedditRipper ripper = new RedditRipper( RedditRipper ripper = new RedditRipper(
new URL("https://www.reddit.com/r/gonewildstories/comments/oz7d97/f_18_finally_having_a_normal_sex_life/") new URI("https://www.reddit.com/r/gonewildstories/comments/oz7d97/f_18_finally_having_a_normal_sex_life/").toURL()
); );
testRipper(ripper); testRipper(ripper);
} }
@Test @Test
@Tag("flaky") @Tag("flaky")
public void testSelfPostAuthorRip() throws IOException { public void testSelfPostAuthorRip() throws IOException, URISyntaxException {
RedditRipper ripper = new RedditRipper(new URL("https://www.reddit.com/user/ickybabie_")); RedditRipper ripper = new RedditRipper(new URI("https://www.reddit.com/user/ickybabie_").toURL());
testRipper(ripper); testRipper(ripper);
} }
@@ -70,9 +71,9 @@ public class RedditRipperTest extends RippersTest {
*/ */
@Test @Test
@Tag("flaky") @Tag("flaky")
public void testRedditGfyBadURL() throws IOException { public void testRedditGfyBadURL() throws IOException, URISyntaxException {
RedditRipper ripper = new RedditRipper( RedditRipper ripper = new RedditRipper(
new URL("https://www.reddit.com/r/bottesting/comments/7msmhi/bad_link/")); new URI("https://www.reddit.com/r/bottesting/comments/7msmhi/bad_link/").toURL());
testRipper(ripper); testRipper(ripper);
} }
@@ -82,16 +83,16 @@ public class RedditRipperTest extends RippersTest {
* @throws IOException * @throws IOException
*/ */
@Test @Test
public void testRedditGfycatRedirectURL() throws IOException { public void testRedditGfycatRedirectURL() throws IOException, URISyntaxException {
RedditRipper ripper = new RedditRipper( RedditRipper ripper = new RedditRipper(
new URL("https://www.reddit.com/r/NSFW_GIF/comments/ennwsa/gorgeous_tits/")); new URI("https://www.reddit.com/r/NSFW_GIF/comments/ennwsa/gorgeous_tits/").toURL());
} }
@Test @Test
@Tag("flaky") @Tag("flaky")
public void testRedditGallery() throws IOException{ public void testRedditGallery() throws IOException, URISyntaxException {
RedditRipper ripper = new RedditRipper( RedditRipper ripper = new RedditRipper(
new URL("https://www.reddit.com/gallery/hrrh23")); new URI("https://www.reddit.com/gallery/hrrh23").toURL());
testRipper(ripper); testRipper(ripper);
} }
} }

View File

@@ -6,7 +6,8 @@ import org.jsoup.nodes.Document;
import org.junit.jupiter.api.*; import org.junit.jupiter.api.*;
import java.io.IOException; import java.io.IOException;
import java.net.URL; import java.net.URI;
import java.net.URISyntaxException;
public class RedgifsRipperTest extends RippersTest { public class RedgifsRipperTest extends RippersTest {
@@ -15,8 +16,8 @@ public class RedgifsRipperTest extends RippersTest {
*/ */
@Test @Test
@Disabled("test or ripper broken") @Disabled("test or ripper broken")
public void testRedgifsGoodURL() throws IOException{ public void testRedgifsGoodURL() throws IOException, URISyntaxException {
RedgifsRipper ripper = new RedgifsRipper(new URL("https://www.redgifs.com/watch/talkativewarpeddragon-petite")); RedgifsRipper ripper = new RedgifsRipper(new URI("https://www.redgifs.com/watch/talkativewarpeddragon-petite").toURL());
testRipper(ripper); testRipper(ripper);
} }
@@ -25,8 +26,8 @@ public class RedgifsRipperTest extends RippersTest {
*/ */
@Test @Test
@Tag("flaky") @Tag("flaky")
public void testRedgifsBadRL() throws IOException{ public void testRedgifsBadRL() throws IOException, URISyntaxException {
RedgifsRipper ripper = new RedgifsRipper(new URL("https://www.gifdeliverynetwork.com/foolishelasticchimpanzee")); RedgifsRipper ripper = new RedgifsRipper(new URI("https://www.gifdeliverynetwork.com/foolishelasticchimpanzee").toURL());
testRipper(ripper); testRipper(ripper);
} }
@@ -35,8 +36,8 @@ public class RedgifsRipperTest extends RippersTest {
*/ */
@Test @Test
@Tag("flaky") @Tag("flaky")
public void testRedgifsProfile() throws IOException { public void testRedgifsProfile() throws IOException, URISyntaxException {
RedgifsRipper ripper = new RedgifsRipper(new URL("https://redgifs.com/users/margo_monty")); RedgifsRipper ripper = new RedgifsRipper(new URI("https://redgifs.com/users/margo_monty").toURL());
testRipper(ripper); testRipper(ripper);
} }
@@ -46,8 +47,8 @@ public class RedgifsRipperTest extends RippersTest {
*/ */
@Test @Test
@Disabled("test or ripper broken") @Disabled("test or ripper broken")
public void testRedgifsSearch() throws IOException { public void testRedgifsSearch() throws IOException, URISyntaxException {
RedgifsRipper ripper = new RedgifsRipper(new URL("https://redgifs.com/gifs/browse/little-caprice")); RedgifsRipper ripper = new RedgifsRipper(new URI("https://redgifs.com/gifs/browse/little-caprice").toURL());
Document doc = ripper.getFirstPage(); Document doc = ripper.getFirstPage();
doc = ripper.getNextPage(doc); doc = ripper.getNextPage(doc);
@@ -58,8 +59,8 @@ public class RedgifsRipperTest extends RippersTest {
@Test @Test
@Tag("flaky") @Tag("flaky")
public void testRedditRedgifs() throws IOException { public void testRedditRedgifs() throws IOException, URISyntaxException {
RedditRipper ripper = new RedditRipper(new URL("https://www.reddit.com/r/nsfwhardcore/comments/ouz5bw/me_cumming_on_his_face/")); RedditRipper ripper = new RedditRipper(new URI("https://www.reddit.com/r/nsfwhardcore/comments/ouz5bw/me_cumming_on_his_face/").toURL());
testRipper(ripper); testRipper(ripper);
} }
} }

View File

@@ -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.Rule34Ripper; import com.rarchives.ripme.ripper.rippers.Rule34Ripper;
@@ -9,14 +11,14 @@ import org.junit.jupiter.api.Test;
public class Rule34RipperTest extends RippersTest { public class Rule34RipperTest extends RippersTest {
@Test @Test
public void testShesFreakyRip() throws IOException { public void testShesFreakyRip() throws IOException, URISyntaxException {
Rule34Ripper ripper = new Rule34Ripper(new URL("https://rule34.xxx/index.php?page=post&s=list&tags=bimbo")); Rule34Ripper ripper = new Rule34Ripper(new URI("https://rule34.xxx/index.php?page=post&s=list&tags=bimbo").toURL());
testRipper(ripper); testRipper(ripper);
} }
@Test @Test
public void testGetGID() throws IOException { public void testGetGID() throws IOException, URISyntaxException {
URL url = new URL("https://rule34.xxx/index.php?page=post&s=list&tags=bimbo"); URL url = new URI("https://rule34.xxx/index.php?page=post&s=list&tags=bimbo").toURL();
Rule34Ripper ripper = new Rule34Ripper(url); Rule34Ripper ripper = new Rule34Ripper(url);
Assertions.assertEquals("bimbo", ripper.getGID(url)); Assertions.assertEquals("bimbo", ripper.getGID(url));
} }

View File

@@ -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.RulePornRipper; import com.rarchives.ripme.ripper.rippers.RulePornRipper;
@@ -9,14 +11,14 @@ import org.junit.jupiter.api.Test;
public class RulePornRipperTest extends RippersTest { public class RulePornRipperTest extends RippersTest {
@Test @Test
public void testRip() throws IOException { public void testRip() throws IOException, URISyntaxException {
RulePornRipper ripper = new RulePornRipper(new URL("https://ruleporn.com/tosh/")); RulePornRipper ripper = new RulePornRipper(new URI("https://ruleporn.com/tosh/").toURL());
testRipper(ripper); testRipper(ripper);
} }
@Test @Test
public void testGetGID() throws IOException { public void testGetGID() throws IOException, URISyntaxException {
URL url = new URL("https://ruleporn.com/tosh/"); URL url = new URI("https://ruleporn.com/tosh/").toURL();
RulePornRipper ripper = new RulePornRipper(url); RulePornRipper ripper = new RulePornRipper(url);
Assertions.assertEquals("tosh", ripper.getGID(url)); Assertions.assertEquals("tosh", ripper.getGID(url));
} }

View File

@@ -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.SankakuComplexRipper; import com.rarchives.ripme.ripper.rippers.SankakuComplexRipper;
@@ -12,30 +14,30 @@ import org.junit.jupiter.api.Test;
public class SankakuComplexRipperTest extends RippersTest { public class SankakuComplexRipperTest extends RippersTest {
@Test @Test
@Disabled("https://github.com/RipMeApp/ripme/issues/257") @Disabled("https://github.com/RipMeApp/ripme/issues/257")
public void testSankakuChanRip() throws IOException { public void testSankakuChanRip() throws IOException, URISyntaxException {
SankakuComplexRipper ripper = new SankakuComplexRipper( SankakuComplexRipper ripper = new SankakuComplexRipper(
new URL("https://chan.sankakucomplex.com/?tags=cleavage")); new URI("https://chan.sankakucomplex.com/?tags=cleavage").toURL());
testRipper(ripper); testRipper(ripper);
} }
@Test @Test
@Disabled("https://github.com/RipMeApp/ripme/issues/257") @Disabled("https://github.com/RipMeApp/ripme/issues/257")
public void testSankakuIdolRip() throws IOException { public void testSankakuIdolRip() throws IOException, URISyntaxException {
SankakuComplexRipper ripper = new SankakuComplexRipper( SankakuComplexRipper ripper = new SankakuComplexRipper(
new URL("https://idol.sankakucomplex.com/?tags=meme_%28me%21me%21me%21%29_%28cosplay%29")); new URI("https://idol.sankakucomplex.com/?tags=meme_%28me%21me%21me%21%29_%28cosplay%29").toURL());
testRipper(ripper); testRipper(ripper);
} }
@Test @Test
public void testgetGID() throws IOException { public void testgetGID() throws IOException, URISyntaxException {
URL url = new URL("https://idol.sankakucomplex.com/?tags=meme_%28me%21me%21me%21%29_%28cosplay%29"); URL url = new URI("https://idol.sankakucomplex.com/?tags=meme_%28me%21me%21me%21%29_%28cosplay%29").toURL();
SankakuComplexRipper ripper = new SankakuComplexRipper(url); SankakuComplexRipper ripper = new SankakuComplexRipper(url);
Assertions.assertEquals("idol._meme_(me!me!me!)_(cosplay)", ripper.getGID(url)); Assertions.assertEquals("idol._meme_(me!me!me!)_(cosplay)", ripper.getGID(url));
} }
@Test @Test
public void testgetSubDomain() throws IOException { public void testgetSubDomain() throws IOException, URISyntaxException {
URL url = new URL("https://idol.sankakucomplex.com/?tags=meme_%28me%21me%21me%21%29_%28cosplay%29"); URL url = new URI("https://idol.sankakucomplex.com/?tags=meme_%28me%21me%21me%21%29_%28cosplay%29").toURL();
SankakuComplexRipper ripper = new SankakuComplexRipper(url); SankakuComplexRipper ripper = new SankakuComplexRipper(url);
Assertions.assertEquals("idol.", ripper.getSubDomain(url)); Assertions.assertEquals("idol.", ripper.getSubDomain(url));
} }

View File

@@ -5,19 +5,21 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
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 java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
public class ScrolllerRipperTest extends RippersTest { public class ScrolllerRipperTest extends RippersTest {
@Test @Test
public void testScrolllerGID() throws IOException { public void testScrolllerGID() throws IOException, URISyntaxException {
Map<URL, String> testURLs = new HashMap<>(); Map<URL, String> testURLs = new HashMap<>();
testURLs.put(new URL("https://scrolller.com/r/CatsStandingUp"), "CatsStandingUp"); testURLs.put(new URI("https://scrolller.com/r/CatsStandingUp").toURL(), "CatsStandingUp");
testURLs.put(new URL("https://scrolller.com/r/CatsStandingUp?filter=pictures"), "CatsStandingUp"); testURLs.put(new URI("https://scrolller.com/r/CatsStandingUp?filter=pictures").toURL(), "CatsStandingUp");
testURLs.put(new URL("https://scrolller.com/r/CatsStandingUp?sort=top&filter=pictures"), "CatsStandingUp"); testURLs.put(new URI("https://scrolller.com/r/CatsStandingUp?sort=top&filter=pictures").toURL(), "CatsStandingUp");
testURLs.put(new URL("https://scrolller.com/r/CatsStandingUp?filter=pictures&sort=top"), "CatsStandingUp"); testURLs.put(new URI("https://scrolller.com/r/CatsStandingUp?filter=pictures&sort=top").toURL(), "CatsStandingUp");
for (URL url : testURLs.keySet()) { for (URL url : testURLs.keySet()) {
ScrolllerRipper ripper = new ScrolllerRipper(url); ScrolllerRipper ripper = new ScrolllerRipper(url);
ripper.setup(); ripper.setup();
@@ -27,19 +29,19 @@ public class ScrolllerRipperTest extends RippersTest {
} }
@Test @Test
public void testScrolllerFilterRegex() throws IOException { public void testScrolllerFilterRegex() throws IOException, URISyntaxException {
Map<URL, String> testURLs = new HashMap<>(); Map<URL, String> testURLs = new HashMap<>();
testURLs.put(new URL("https://scrolller.com/r/CatsStandingUp"), "NOFILTER"); testURLs.put(new URI("https://scrolller.com/r/CatsStandingUp").toURL(), "NOFILTER");
testURLs.put(new URL("https://scrolller.com/r/CatsStandingUp?filter=pictures"), "PICTURE"); testURLs.put(new URI("https://scrolller.com/r/CatsStandingUp?filter=pictures").toURL(), "PICTURE");
testURLs.put(new URL("https://scrolller.com/r/CatsStandingUp?filter=videos"), "VIDEO"); testURLs.put(new URI("https://scrolller.com/r/CatsStandingUp?filter=videos").toURL(), "VIDEO");
testURLs.put(new URL("https://scrolller.com/r/CatsStandingUp?filter=albums"), "ALBUM"); testURLs.put(new URI("https://scrolller.com/r/CatsStandingUp?filter=albums").toURL(), "ALBUM");
testURLs.put(new URL("https://scrolller.com/r/CatsStandingUp?sort=top&filter=pictures"), "PICTURE"); testURLs.put(new URI("https://scrolller.com/r/CatsStandingUp?sort=top&filter=pictures").toURL(), "PICTURE");
testURLs.put(new URL("https://scrolller.com/r/CatsStandingUp?sort=top&filter=videos"), "VIDEO"); testURLs.put(new URI("https://scrolller.com/r/CatsStandingUp?sort=top&filter=videos").toURL(), "VIDEO");
testURLs.put(new URL("https://scrolller.com/r/CatsStandingUp?sort=top&filter=albums"), "ALBUM"); testURLs.put(new URI("https://scrolller.com/r/CatsStandingUp?sort=top&filter=albums").toURL(), "ALBUM");
testURLs.put(new URL("https://scrolller.com/r/CatsStandingUp?filter=pictures&sort=top"), "PICTURE"); testURLs.put(new URI("https://scrolller.com/r/CatsStandingUp?filter=pictures&sort=top").toURL(), "PICTURE");
testURLs.put(new URL("https://scrolller.com/r/CatsStandingUp?filter=videos&sort=top"), "VIDEO"); testURLs.put(new URI("https://scrolller.com/r/CatsStandingUp?filter=videos&sort=top").toURL(), "VIDEO");
testURLs.put(new URL("https://scrolller.com/r/CatsStandingUp?filter=albums&sort=top"), "ALBUM"); testURLs.put(new URI("https://scrolller.com/r/CatsStandingUp?filter=albums&sort=top").toURL(), "ALBUM");
for (URL url : testURLs.keySet()) { for (URL url : testURLs.keySet()) {
ScrolllerRipper ripper = new ScrolllerRipper(url); ScrolllerRipper ripper = new ScrolllerRipper(url);
ripper.setup(); ripper.setup();

View File

@@ -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.ShesFreakyRipper; import com.rarchives.ripme.ripper.rippers.ShesFreakyRipper;
@@ -12,15 +14,15 @@ import org.junit.jupiter.api.Test;
public class ShesFreakyRipperTest extends RippersTest { public class ShesFreakyRipperTest extends RippersTest {
@Test @Test
@Disabled("https://github.com/RipMeApp/ripme/issues/254") @Disabled("https://github.com/RipMeApp/ripme/issues/254")
public void testShesFreakyRip() throws IOException { public void testShesFreakyRip() throws IOException, URISyntaxException {
ShesFreakyRipper ripper = new ShesFreakyRipper( ShesFreakyRipper ripper = new ShesFreakyRipper(
new URL("http://www.shesfreaky.com/gallery/nicee-snow-bunny-579NbPjUcYa.html")); new URI("http://www.shesfreaky.com/gallery/nicee-snow-bunny-579NbPjUcYa.html").toURL());
testRipper(ripper); testRipper(ripper);
} }
@Test @Test
public void testGetGID() throws IOException { public void testGetGID() throws IOException, URISyntaxException {
URL url = new URL("http://www.shesfreaky.com/gallery/nicee-snow-bunny-579NbPjUcYa.html"); URL url = new URI("http://www.shesfreaky.com/gallery/nicee-snow-bunny-579NbPjUcYa.html").toURL();
ShesFreakyRipper ripper = new ShesFreakyRipper(url); ShesFreakyRipper ripper = new ShesFreakyRipper(url);
Assertions.assertEquals("nicee-snow-bunny-579NbPjUcYa", ripper.getGID(url)); Assertions.assertEquals("nicee-snow-bunny-579NbPjUcYa", ripper.getGID(url));
} }

View File

@@ -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.TapasticRipper; import com.rarchives.ripme.ripper.rippers.TapasticRipper;
@@ -11,14 +13,14 @@ import org.junit.jupiter.api.Test;
public class TapasticRipperTest extends RippersTest { public class TapasticRipperTest extends RippersTest {
@Test @Test
@Disabled("ripper broken") @Disabled("ripper broken")
public void testTapasticRip() throws IOException { public void testTapasticRip() throws IOException, URISyntaxException {
TapasticRipper ripper = new TapasticRipper(new URL("https://tapas.io/series/TPIAG")); TapasticRipper ripper = new TapasticRipper(new URI("https://tapas.io/series/TPIAG").toURL());
testRipper(ripper); testRipper(ripper);
} }
@Test @Test
public void testGetGID() throws IOException { public void testGetGID() throws IOException, URISyntaxException {
URL url = new URL("https://tapas.io/series/TPIAG"); URL url = new URI("https://tapas.io/series/TPIAG").toURL();
TapasticRipper ripper = new TapasticRipper(url); TapasticRipper ripper = new TapasticRipper(url);
Assertions.assertEquals("series_ TPIAG", ripper.getGID(url)); Assertions.assertEquals("series_ TPIAG", ripper.getGID(url));
} }