mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-19 12:11:40 +02:00
new URI instead of new URL in tests, 6.
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
package com.rarchives.ripme.tst.ripper.rippers;
|
||||
|
||||
import com.rarchives.ripme.ripper.rippers.HentaidudeRipper;
|
||||
import com.rarchives.ripme.utils.Utils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
public class HentaidudeRipperTest extends RippersTest{
|
||||
|
||||
public void testRip() throws IOException {
|
||||
HentaidudeRipper ripper = new HentaidudeRipper(new URL("https://hentaidude.com/girlfriends-4ever-dlc-2/"));
|
||||
public void testRip() throws IOException, URISyntaxException {
|
||||
HentaidudeRipper ripper = new HentaidudeRipper(new URI("https://hentaidude.com/girlfriends-4ever-dlc-2/").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.HentaifoundryRipper;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
@@ -9,19 +10,19 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
public class HentaifoundryRipperTest extends RippersTest {
|
||||
@Test
|
||||
public void testHentaifoundryRip() throws IOException {
|
||||
HentaifoundryRipper ripper = new HentaifoundryRipper(new URL("https://www.hentai-foundry.com/pictures/user/personalami"));
|
||||
public void testHentaifoundryRip() throws IOException, URISyntaxException {
|
||||
HentaifoundryRipper ripper = new HentaifoundryRipper(new URI("https://www.hentai-foundry.com/pictures/user/personalami").toURL());
|
||||
testRipper(ripper);
|
||||
}
|
||||
@Test
|
||||
public void testHentaifoundryGetGID() throws IOException {
|
||||
HentaifoundryRipper ripper = new HentaifoundryRipper(new URL("https://www.hentai-foundry.com/stories/user/Rakked"));
|
||||
public void testHentaifoundryGetGID() throws IOException, URISyntaxException {
|
||||
HentaifoundryRipper ripper = new HentaifoundryRipper(new URI("https://www.hentai-foundry.com/stories/user/Rakked").toURL());
|
||||
testRipper(ripper);
|
||||
Assertions.assertEquals("Rakked", ripper.getGID(new URL("https://www.hentai-foundry.com/stories/user/Rakked")));
|
||||
Assertions.assertEquals("Rakked", ripper.getGID(new URI("https://www.hentai-foundry.com/stories/user/Rakked").toURL()));
|
||||
}
|
||||
@Test
|
||||
public void testHentaifoundryPdfRip() throws IOException {
|
||||
HentaifoundryRipper ripper = new HentaifoundryRipper(new URL("https://www.hentai-foundry.com/stories/user/Rakked"));
|
||||
public void testHentaifoundryPdfRip() throws IOException, URISyntaxException {
|
||||
HentaifoundryRipper ripper = new HentaifoundryRipper(new URI("https://www.hentai-foundry.com/stories/user/Rakked").toURL());
|
||||
testRipper(ripper);
|
||||
}
|
||||
}
|
||||
|
@@ -1,13 +1,14 @@
|
||||
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.HentaifoxRipper;
|
||||
|
||||
public class HentaifoxRipperTest extends RippersTest {
|
||||
public void testRip() throws IOException {
|
||||
HentaifoxRipper ripper = new HentaifoxRipper(new URL("https://hentaifox.com/gallery/38544/"));
|
||||
public void testRip() throws IOException, URISyntaxException {
|
||||
HentaifoxRipper ripper = new HentaifoxRipper(new URI("https://hentaifox.com/gallery/38544/").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.HentaiimageRipper;
|
||||
import com.rarchives.ripme.utils.Utils;
|
||||
@@ -9,9 +10,9 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
public class HentaiimageRipperTest extends RippersTest {
|
||||
@Test
|
||||
public void testHentaifoundryRip() throws IOException {
|
||||
public void testHentaifoundryRip() throws IOException, URISyntaxException {
|
||||
if (Utils.getConfigBoolean("test.run_flaky_tests", false)) {
|
||||
HentaiimageRipper ripper = new HentaiimageRipper(new URL("https://hentai-image.com/image/afrobull-gerudo-ongoing-12/"));
|
||||
HentaiimageRipper ripper = new HentaiimageRipper(new URI("https://hentai-image.com/image/afrobull-gerudo-ongoing-12/").toURL());
|
||||
testRipper(ripper);
|
||||
}
|
||||
}
|
||||
|
@@ -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 java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -17,12 +19,12 @@ public class HentainexusRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
@Disabled("20/05/2021 This test was disabled as the site has experienced notable downtime")
|
||||
public void testHentaiNexusJson() throws IOException {
|
||||
public void testHentaiNexusJson() throws IOException, URISyntaxException {
|
||||
List<URL> testURLs = new ArrayList<>();
|
||||
testURLs.add(new URL("https://hentainexus.com/view/9202"));
|
||||
testURLs.add(new URL("https://hentainexus.com/read/9202"));
|
||||
testURLs.add(new URL("https://hentainexus.com/view/9202#001"));
|
||||
testURLs.add(new URL("https://hentainexus.com/read/9202#001"));
|
||||
testURLs.add(new URI("https://hentainexus.com/view/9202").toURL());
|
||||
testURLs.add(new URI("https://hentainexus.com/read/9202").toURL());
|
||||
testURLs.add(new URI("https://hentainexus.com/view/9202#001").toURL());
|
||||
testURLs.add(new URI("https://hentainexus.com/read/9202#001").toURL());
|
||||
|
||||
for (URL url : testURLs) {
|
||||
|
||||
|
@@ -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.HitomiRipper;
|
||||
|
||||
@@ -12,9 +13,9 @@ import org.junit.jupiter.api.Test;
|
||||
public class HitomiRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Disabled("Broken ripper")
|
||||
public void testRip() throws IOException {
|
||||
HitomiRipper ripper = new HitomiRipper(new URL("https://hitomi.la/galleries/975973.html"));
|
||||
public void testRip() throws IOException, URISyntaxException {
|
||||
HitomiRipper ripper = new HitomiRipper(new URI("https://hitomi.la/galleries/975973.html").toURL());
|
||||
testRipper(ripper);
|
||||
Assertions.assertTrue(ripper.getGID(new URL("https://hitomi.la/galleries/975973.html")).equals("975973"));
|
||||
Assertions.assertTrue(ripper.getGID(new URI("https://hitomi.la/galleries/975973.html").toURL()).equals("975973"));
|
||||
}
|
||||
}
|
||||
|
@@ -6,36 +6,38 @@ import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
|
||||
public class HqpornerRipperTest extends RippersTest {
|
||||
|
||||
public void testRip() throws IOException {
|
||||
public void testRip() throws IOException, URISyntaxException {
|
||||
if (Utils.getConfigBoolean("test.run_flaky_tests", false)) {
|
||||
HqpornerRipper ripper = new HqpornerRipper(
|
||||
new URL("https://hqporner.com/hdporn/84636-pool_lesson_with_a_cheating_husband.html"));
|
||||
new URI("https://hqporner.com/hdporn/84636-pool_lesson_with_a_cheating_husband.html").toURL());
|
||||
testRipper(ripper);
|
||||
}
|
||||
}
|
||||
|
||||
public void testGetGID() throws IOException {
|
||||
URL poolURL = new URL("https://hqporner.com/hdporn/84636-pool_lesson_with_a_cheating_husband.html");
|
||||
public void testGetGID() throws IOException, URISyntaxException {
|
||||
URL poolURL = new URI("https://hqporner.com/hdporn/84636-pool_lesson_with_a_cheating_husband.html").toURL();
|
||||
HqpornerRipper ripper = new HqpornerRipper(poolURL);
|
||||
Assertions.assertEquals("84636-pool_lesson_with_a_cheating_husband", ripper.getGID(poolURL));
|
||||
}
|
||||
@Test
|
||||
public void testGetURLsFromPage() throws IOException {
|
||||
URL actressUrl = new URL("https://hqporner.com/actress/kali-roses");
|
||||
public void testGetURLsFromPage() throws IOException, URISyntaxException {
|
||||
URL actressUrl = new URI("https://hqporner.com/actress/kali-roses").toURL();
|
||||
HqpornerRipper ripper = new HqpornerRipper(actressUrl);
|
||||
assert (ripper.getURLsFromPage(ripper.getFirstPage()).size() >= 2);
|
||||
}
|
||||
@Test
|
||||
public void testGetNextPage() throws IOException {
|
||||
URL multiPageUrl = new URL("https://hqporner.com/category/tattooed");
|
||||
public void testGetNextPage() throws IOException, URISyntaxException {
|
||||
URL multiPageUrl = new URI("https://hqporner.com/category/tattooed").toURL();
|
||||
HqpornerRipper multiPageRipper = new HqpornerRipper(multiPageUrl);
|
||||
assert (multiPageRipper.getNextPage(multiPageRipper.getFirstPage()) != null);
|
||||
|
||||
URL singlePageUrl = new URL("https://hqporner.com/actress/amy-reid");
|
||||
URL singlePageUrl = new URI("https://hqporner.com/actress/amy-reid").toURL();
|
||||
HqpornerRipper ripper = new HqpornerRipper(singlePageUrl);
|
||||
try {
|
||||
ripper.getNextPage(ripper.getFirstPage());
|
||||
@@ -44,26 +46,26 @@ public class HqpornerRipperTest extends RippersTest {
|
||||
}
|
||||
}
|
||||
@Test
|
||||
public void testMyDaddyVideoHost() throws IOException {
|
||||
public void testMyDaddyVideoHost() throws IOException, URISyntaxException {
|
||||
if (Utils.getConfigBoolean("test.run_flaky_tests", false)) {
|
||||
URL myDaddyUrl = new URL("https://hqporner.com/hdporn/84636-pool_lesson_with_a_cheating_husband.html");
|
||||
URL myDaddyUrl = new URI("https://hqporner.com/hdporn/84636-pool_lesson_with_a_cheating_husband.html").toURL();
|
||||
HqpornerRipper myDaddyRipper = new HqpornerRipper(myDaddyUrl);
|
||||
testRipper(myDaddyRipper);
|
||||
}
|
||||
}
|
||||
@Test
|
||||
public void testFlyFlvVideoHost() throws IOException {
|
||||
public void testFlyFlvVideoHost() throws IOException, URISyntaxException {
|
||||
if (Utils.getConfigBoolean("test.run_flaky_tests", false)) {
|
||||
URL flyFlvUrl = new URL(
|
||||
"https://hqporner.com/hdporn/69862-bangbros_-_amy_reid_taking_off_a_tight_sexy_swimsuit.html");
|
||||
URL flyFlvUrl = new URI(
|
||||
"https://hqporner.com/hdporn/69862-bangbros_-_amy_reid_taking_off_a_tight_sexy_swimsuit.html").toURL();
|
||||
HqpornerRipper flyFlvRipper = new HqpornerRipper(flyFlvUrl);
|
||||
testRipper(flyFlvRipper);
|
||||
}
|
||||
}
|
||||
@Test
|
||||
public void testUnknownVideoHost() throws IOException {
|
||||
public void testUnknownVideoHost() throws IOException, URISyntaxException {
|
||||
if (Utils.getConfigBoolean("test.run_flaky_tests", false)) {
|
||||
URL unknownHostUrl = new URL("https://hqporner.com/hdporn/79528-Kayden_Kross_-_Serious_Masturbation.html"); // howq.cc
|
||||
URL unknownHostUrl = new URI("https://hqporner.com/hdporn/79528-Kayden_Kross_-_Serious_Masturbation.html").toURL(); // howq.cc
|
||||
HqpornerRipper unknownHostRipper = new HqpornerRipper(unknownHostUrl);
|
||||
testRipper(unknownHostRipper);
|
||||
}
|
||||
|
@@ -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.HypnohubRipper;
|
||||
@@ -11,21 +13,21 @@ import org.junit.jupiter.api.Test;
|
||||
public class HypnohubRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Disabled("wants a hunman")
|
||||
public void testRip() throws IOException {
|
||||
URL poolURL = new URL("http://hypnohub.net/pool/show/2303");
|
||||
URL postURL = new URL("http://hypnohub.net/post/show/63464/black_hair-bracelet-collar-corruption-female_only-");
|
||||
public void testRip() throws IOException, URISyntaxException {
|
||||
URL poolURL = new URI("http://hypnohub.net/pool/show/2303").toURL();
|
||||
URL postURL = new URI("http://hypnohub.net/post/show/63464/black_hair-bracelet-collar-corruption-female_only-").toURL();
|
||||
HypnohubRipper ripper = new HypnohubRipper(poolURL);
|
||||
testRipper(ripper);
|
||||
ripper = new HypnohubRipper(postURL);
|
||||
testRipper(ripper);
|
||||
}
|
||||
@Test
|
||||
public void testGetGID() throws IOException {
|
||||
URL poolURL = new URL("http://hypnohub.net/pool/show/2303");
|
||||
public void testGetGID() throws IOException, URISyntaxException {
|
||||
URL poolURL = new URI("http://hypnohub.net/pool/show/2303").toURL();
|
||||
HypnohubRipper ripper = new HypnohubRipper(poolURL);
|
||||
Assertions.assertEquals("2303", ripper.getGID(poolURL));
|
||||
|
||||
URL postURL = new URL("http://hypnohub.net/post/show/63464/black_hair-bracelet-collar-corruption-female_only-");
|
||||
URL postURL = new URI("http://hypnohub.net/post/show/63464/black_hair-bracelet-collar-corruption-female_only-").toURL();
|
||||
Assertions.assertEquals("63464_black_hair-bracelet-collar-corruption-female_only-", ripper.getGID(postURL));
|
||||
}
|
||||
}
|
||||
|
@@ -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.ImagebamRipper;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
@@ -10,8 +11,8 @@ import org.junit.jupiter.api.Test;
|
||||
public class ImagebamRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testImagebamRip() throws IOException {
|
||||
ImagebamRipper ripper = new ImagebamRipper(new URL("http://www.imagebam.com/gallery/488cc796sllyf7o5srds8kpaz1t4m78i"));
|
||||
public void testImagebamRip() throws IOException, URISyntaxException {
|
||||
ImagebamRipper ripper = new ImagebamRipper(new URI("http://www.imagebam.com/gallery/488cc796sllyf7o5srds8kpaz1t4m78i").toURL());
|
||||
testRipper(ripper);
|
||||
}
|
||||
}
|
||||
|
@@ -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 java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -13,15 +15,15 @@ import org.junit.jupiter.api.Test;
|
||||
public class ImagefapRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testImagefapAlbums() throws IOException {
|
||||
public void testImagefapAlbums() throws IOException, URISyntaxException {
|
||||
Map<URL, String> testURLs = new HashMap<>();
|
||||
|
||||
// Album with specific title
|
||||
testURLs.put(new URL("http://www.imagefap.com/pictures/4649440/Frozen-%28Elsa-and-Anna%29?view=2"),
|
||||
testURLs.put(new URI("http://www.imagefap.com/pictures/4649440/Frozen-%28Elsa-and-Anna%29?view=2").toURL(),
|
||||
"Frozen (Elsa and Anna)");
|
||||
|
||||
// New URL format
|
||||
testURLs.put(new URL("http://www.imagefap.com/gallery.php?pgid=fffd68f659befa5535cf78f014e348f1"),
|
||||
testURLs.put(new URI("http://www.imagefap.com/gallery.php?pgid=fffd68f659befa5535cf78f014e348f1").toURL(),
|
||||
"imagefap_fffd68f659befa5535cf78f014e348f1");
|
||||
|
||||
for (URL url : testURLs.keySet()) {
|
||||
@@ -31,8 +33,8 @@ public class ImagefapRipperTest extends RippersTest {
|
||||
}
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testImagefapGetAlbumTitle() throws IOException {
|
||||
URL url = new URL("https://www.imagefap.com/gallery.php?gid=7789753");
|
||||
public void testImagefapGetAlbumTitle() throws IOException, URISyntaxException {
|
||||
URL url = new URI("https://www.imagefap.com/gallery.php?gid=7789753").toURL();
|
||||
ImagefapRipper ripper = new ImagefapRipper(url);
|
||||
Assertions.assertEquals("imagefap_Red.Heels.Lover.In.Love_7789753", ripper.getAlbumTitle(url));
|
||||
}
|
||||
|
Reference in New Issue
Block a user