1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-01-16 20:28:15 +01:00

new URI instead of new URL in tests, 9.

This commit is contained in:
soloturn 2023-06-13 07:35:08 +02:00
parent 3c8b677926
commit 874c565c56
23 changed files with 187 additions and 153 deletions

View File

@ -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.MotherlessRipper;
@ -11,8 +12,8 @@ import org.junit.jupiter.api.Test;
public class MotherlessRipperTest extends RippersTest {
@Test
@Tag("flaky")
public void testMotherlessAlbumRip() throws IOException {
MotherlessRipper ripper = new MotherlessRipper(new URL("https://motherless.com/G1168D90"));
public void testMotherlessAlbumRip() throws IOException, URISyntaxException {
MotherlessRipper ripper = new MotherlessRipper(new URI("https://motherless.com/G1168D90").toURL());
testRipper(ripper);
}
}

View File

@ -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.MyhentaicomicsRipper;
@ -11,32 +13,32 @@ import org.junit.jupiter.api.Test;
public class MyhentaicomicsRipperTest extends RippersTest {
@Test
@Tag("flaky")
public void testMyhentaicomicsAlbum() throws IOException {
MyhentaicomicsRipper ripper = new MyhentaicomicsRipper(new URL("http://myhentaicomics.com/index.php/Nienna-Lost-Tales"));
public void testMyhentaicomicsAlbum() throws IOException, URISyntaxException {
MyhentaicomicsRipper ripper = new MyhentaicomicsRipper(new URI("http://myhentaicomics.com/index.php/Nienna-Lost-Tales").toURL());
testRipper(ripper);
}
public void testGetGID() throws IOException {
URL url = new URL("http://myhentaicomics.com/index.php/Nienna-Lost-Tales");
public void testGetGID() throws IOException, URISyntaxException {
URL url = new URI("http://myhentaicomics.com/index.php/Nienna-Lost-Tales").toURL();
MyhentaicomicsRipper ripper = new MyhentaicomicsRipper(url);
// Test a comic
Assertions.assertEquals("Nienna-Lost-Tales", ripper.getGID(url));
// Test a search
Assertions.assertEquals("test", ripper.getGID(new URL("http://myhentaicomics.com/index.php/search?q=test")));
Assertions.assertEquals("test", ripper.getGID(new URI("http://myhentaicomics.com/index.php/search?q=test").toURL()));
// Test a tag
Assertions.assertEquals("2409", ripper.getGID(new URL("http://myhentaicomics.com/index.php/tag/2409/")));
Assertions.assertEquals("2409", ripper.getGID(new URI("http://myhentaicomics.com/index.php/tag/2409/").toURL()));
}
@Test
@Tag("flaky")
public void testGetAlbumsToQueue() throws IOException {
URL url = new URL("https://myhentaicomics.com/index.php/tag/3167/");
public void testGetAlbumsToQueue() throws IOException, URISyntaxException {
URL url = new URI("https://myhentaicomics.com/index.php/tag/3167/").toURL();
MyhentaicomicsRipper ripper = new MyhentaicomicsRipper(url);
Assertions.assertEquals(15, ripper.getAlbumsToQueue(ripper.getFirstPage()).size());
}
@Test
public void testPageContainsAlbums() throws IOException {
URL url = new URL("https://myhentaicomics.com/index.php/tag/3167/");
URL url2 = new URL("https://myhentaicomics.com/index.php/search?q=test");
public void testPageContainsAlbums() throws IOException, URISyntaxException {
URL url = new URI("https://myhentaicomics.com/index.php/tag/3167/").toURL();
URL url2 = new URI("https://myhentaicomics.com/index.php/search?q=test").toURL();
MyhentaicomicsRipper ripper = new MyhentaicomicsRipper(url);
Assertions.assertTrue(ripper.pageContainsAlbums(url));
Assertions.assertTrue(ripper.pageContainsAlbums(url2));

View File

@ -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.MyhentaigalleryRipper;
@ -11,15 +13,15 @@ import org.junit.jupiter.api.Test;
public class MyhentaigalleryRipperTest extends RippersTest {
@Test
@Tag("flaky")
public void testMyhentaigalleryAlbum() throws IOException {
public void testMyhentaigalleryAlbum() throws IOException, URISyntaxException {
MyhentaigalleryRipper ripper = new MyhentaigalleryRipper(
new URL("https://myhentaigallery.com/gallery/thumbnails/9201"));
new URI("https://myhentaigallery.com/gallery/thumbnails/9201").toURL());
testRipper(ripper);
}
@Test
public void testGetGID() throws IOException {
URL url = new URL("https://myhentaigallery.com/gallery/thumbnails/9201");
public void testGetGID() throws IOException, URISyntaxException {
URL url = new URI("https://myhentaigallery.com/gallery/thumbnails/9201").toURL();
MyhentaigalleryRipper ripper = new MyhentaigalleryRipper(url);
Assertions.assertEquals("9201", ripper.getGID(url));
}

View File

@ -1,13 +1,15 @@
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.MyreadingmangaRipper;
public class MyreadingmangaRipperTest extends RippersTest {
public void testRip() throws IOException {
MyreadingmangaRipper ripper = new MyreadingmangaRipper(new URL("https://myreadingmanga.info/zelo-lee-brave-lover-dj-slave-market-jp/"));
public void testRip() throws IOException, URISyntaxException {
MyreadingmangaRipper ripper = new MyreadingmangaRipper(new URI("https://myreadingmanga.info/zelo-lee-brave-lover-dj-slave-market-jp/").toURL());
testRipper(ripper);
}
}

View File

@ -25,10 +25,10 @@
// public void testNatalieMuURLPasses() throws IOException {
// List<URL> passURLs = new ArrayList<>();
// // URLs that should work
// passURLs.add(new URL("http://natalie.mu/music/news/140367"));
// passURLs.add(new URL("http://cdn2.natalie.mu/music/news/140411"));
// passURLs.add(new URL("http://cdn2.natalie.mu/music/gallery/show/news_id/140411/image_id/369655"));
// passURLs.add(new URL("http://natalie.mu/music/gallery/show/news_id/139146/image_id/365218"));
// passURLs.add(new URI("http://natalie.mu/music/news/140367").toURL());
// passURLs.add(new URI("http://cdn2.natalie.mu/music/news/140411").toURL());
// passURLs.add(new URI("http://cdn2.natalie.mu/music/gallery/show/news_id/140411/image_id/369655").toURL());
// passURLs.add(new URI("http://natalie.mu/music/gallery/show/news_id/139146/image_id/365218").toURL());
// for (URL url : passURLs) {
// NatalieMuRipper ripper = new NatalieMuRipper(url);
// ripper.setup();
@ -42,19 +42,19 @@
// public void testNatalieMuRipper() throws IOException {
// List<URL> contentURLs = new ArrayList<>();
// // URLs that should return more than 1 image
// contentURLs.add(new URL("http://natalie.mu/music/news/140367"));
// contentURLs.add(new URL("http://cdn2.natalie.mu/music/news/140411"));
// contentURLs.add(new URL("http://cdn2.natalie.mu/music/gallery/show/news_id/140411/image_id/369655"));
// contentURLs.add(new URL("http://natalie.mu/music/gallery/show/news_id/139146/image_id/365218"));
// contentURLs.add(new URI("http://natalie.mu/music/news/140367").toURL());
// contentURLs.add(new URI("http://cdn2.natalie.mu/music/news/140411").toURL());
// contentURLs.add(new URI("http://cdn2.natalie.mu/music/gallery/show/news_id/140411/image_id/369655").toURL());
// contentURLs.add(new URI("http://natalie.mu/music/gallery/show/news_id/139146/image_id/365218").toURL());
//
// // Most *chans have volatile threads & can't be trusted for integration testing.
//
// //contentURLs.add(new URL("http://boards.4chan.org/r/res/12225949"));
// //contentURLs.add(new URL("http://7chan.org/gif/res/23795.html"));
// //contentURLs.add(new URL("http://unichan2.org/b/res/518004.html"));
// //contentURLs.add(new URI("http://boards.4chan.org/r/res/12225949").toURL());
// //contentURLs.add(new URI("http://7chan.org/gif/res/23795.html").toURL());
// //contentURLs.add(new URI("http://unichan2.org/b/res/518004.html").toURL());
//
// // xchan has an HTTPS certificaiton error...
// //contentURLs.add(new URL("http://xchan.pw/porn/res/437.html"));
// //contentURLs.add(new URI("http://xchan.pw/porn/res/437.html").toURL());
// for (URL url : contentURLs) {
// NatalieMuRipper ripper = new NatalieMuRipper(url);
// testRipper(ripper);

View File

@ -6,19 +6,21 @@ import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
public class NewgroundsRipperTest extends RippersTest {
@Test
@Tag("flaky")
public void testNewgroundsRip() throws IOException {
NewgroundsRipper ripper = new NewgroundsRipper(new URL("https://zone-sama.newgrounds.com/art"));
public void testNewgroundsRip() throws IOException, URISyntaxException {
NewgroundsRipper ripper = new NewgroundsRipper(new URI("https://zone-sama.newgrounds.com/art").toURL());
testRipper(ripper);
}
@Test
public void testGetGID() throws IOException {
URL url = new URL("https://zone-sama.newgrounds.com/art");
public void testGetGID() throws IOException, URISyntaxException {
URL url = new URI("https://zone-sama.newgrounds.com/art").toURL();
NewgroundsRipper ripper = new NewgroundsRipper(url);
Assertions.assertEquals("zone-sama", ripper.getGID(url));
}

View File

@ -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.NfsfwRipper;
@ -13,21 +15,21 @@ public class NfsfwRipperTest extends RippersTest {
@Test
@Disabled("https://github.com/RipMeApp/ripme/issues/291 -- nfsfw 'account suspended' error; disabled flaky test in CI")
public void testNfsfwRip() throws IOException {
NfsfwRipper ripper = new NfsfwRipper(new URL("http://nfsfw.com/gallery/v/Kitten/"));
public void testNfsfwRip() throws IOException, URISyntaxException {
NfsfwRipper ripper = new NfsfwRipper(new URI("http://nfsfw.com/gallery/v/Kitten/").toURL());
testRipper(ripper);
}
@Test
public void testGetGID() throws IOException {
URL url = new URL("http://nfsfw.com/gallery/v/Kitten/");
public void testGetGID() throws IOException, URISyntaxException {
URL url = new URI("http://nfsfw.com/gallery/v/Kitten/").toURL();
NfsfwRipper ripper = new NfsfwRipper(url);
Assertions.assertEquals("Kitten", ripper.getGID(url));
url = new URL("http://nfsfw.com/gallery/v/Kitten");
url = new URI("http://nfsfw.com/gallery/v/Kitten").toURL();
Assertions.assertEquals("Kitten", ripper.getGID(url));
url = new URL("http://nfsfw.com/gallery/v/Kitten/gif_001/");
url = new URI("http://nfsfw.com/gallery/v/Kitten/gif_001/").toURL();
Assertions.assertEquals("Kitten__gif_001", ripper.getGID(url));
url = new URL("http://nfsfw.com/gallery/v/Kitten/gif_001/");
url = new URI("http://nfsfw.com/gallery/v/Kitten/gif_001/").toURL();
Assertions.assertEquals("Kitten__gif_001", ripper.getGID(url));
}
}

View File

@ -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.List;
@ -11,21 +13,21 @@ import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
public class NhentaiRipperTest extends RippersTest {
public void testRip() throws IOException {
NhentaiRipper ripper = new NhentaiRipper(new URL("https://nhentai.net/g/233295/"));
public void testRip() throws IOException, URISyntaxException {
NhentaiRipper ripper = new NhentaiRipper(new URI("https://nhentai.net/g/233295/").toURL());
testRipper(ripper);
}
public void testGetGID() throws IOException {
NhentaiRipper ripper = new NhentaiRipper(new URL("https://nhentai.net/g/233295/"));
Assertions.assertEquals("233295", ripper.getGID(new URL("https://nhentai.net/g/233295/")));
public void testGetGID() throws IOException, URISyntaxException {
NhentaiRipper ripper = new NhentaiRipper(new URI("https://nhentai.net/g/233295/").toURL());
Assertions.assertEquals("233295", ripper.getGID(new URI("https://nhentai.net/g/233295/").toURL()));
}
// Test the tag black listing
@Test
@Tag("flaky")
public void testTagBlackList() throws IOException {
URL url = new URL("https://nhentai.net/g/233295/");
public void testTagBlackList() throws IOException, URISyntaxException {
URL url = new URI("https://nhentai.net/g/233295/").toURL();
NhentaiRipper ripper = new NhentaiRipper(url);
List<String> tagsOnPage = ripper.getTags(ripper.getFirstPage());
// Test multiple blacklisted tags

View File

@ -4,12 +4,13 @@ import com.rarchives.ripme.ripper.rippers.NsfwXxxRipper;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.net.URL;
import java.net.URI;
import java.net.URISyntaxException;
public class NsfwXxxRipperTest extends RippersTest {
@Test
public void testNsfwXxxUser() throws IOException {
NsfwXxxRipper ripper = new NsfwXxxRipper(new URL("https://nsfw.xxx/user/smay3991"));
public void testNsfwXxxUser() throws IOException, URISyntaxException {
NsfwXxxRipper ripper = new NsfwXxxRipper(new URI("https://nsfw.xxx/user/smay3991").toURL());
testRipper(ripper);
}
}

View File

@ -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.NudeGalsRipper;
import org.junit.jupiter.api.Assertions;
@ -9,14 +10,14 @@ import org.junit.jupiter.api.Test;
public class NudeGalsRipperTest extends RippersTest {
@Test
public void testRip() throws IOException {
NudeGalsRipper ripper = new NudeGalsRipper(new URL("https://nude-gals.com/photoshoot.php?photoshoot_id=5541"));
public void testRip() throws IOException, URISyntaxException {
NudeGalsRipper ripper = new NudeGalsRipper(new URI("https://nude-gals.com/photoshoot.php?photoshoot_id=5541").toURL());
testRipper(ripper);
}
@Test
public void testGetGID() throws IOException {
NudeGalsRipper ripper = new NudeGalsRipper(new URL("https://nude-gals.com/photoshoot.php?photoshoot_id=5541"));
Assertions.assertEquals("5541", ripper.getGID( new URL("https://nude-gals.com/photoshoot.php?photoshoot_id=5541")));
public void testGetGID() throws IOException, URISyntaxException {
NudeGalsRipper ripper = new NudeGalsRipper(new URI("https://nude-gals.com/photoshoot.php?photoshoot_id=5541").toURL());
Assertions.assertEquals("5541", ripper.getGID( new URI("https://nude-gals.com/photoshoot.php?photoshoot_id=5541").toURL()));
}
}

View File

@ -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.OglafRipper;
@ -9,8 +10,8 @@ import org.junit.jupiter.api.Test;
public class OglafRipperTest extends RippersTest {
@Test
public void testRip() throws IOException {
OglafRipper ripper = new OglafRipper(new URL("http://oglaf.com/plumes/"));
public void testRip() throws IOException, URISyntaxException {
OglafRipper ripper = new OglafRipper(new URI("http://oglaf.com/plumes/").toURL());
testRipper(ripper);
}
}

View File

@ -1,16 +1,17 @@
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.PahealRipper;
import org.junit.jupiter.api.Test;
public class PahealRipperTest extends RippersTest {
@Test
public void testPahealRipper() throws IOException {
public void testPahealRipper() throws IOException, URISyntaxException {
// a photo set
PahealRipper ripper = new PahealRipper(new URL("http://rule34.paheal.net/post/list/bimbo/1"));
PahealRipper ripper = new PahealRipper(new URI("http://rule34.paheal.net/post/list/bimbo/1").toURL());
testRipper(ripper);
}
}

View File

@ -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.PawooRipper;
import org.junit.jupiter.api.Tag;
@ -10,8 +11,8 @@ import org.junit.jupiter.api.Test;
public class PawooRipperTest extends RippersTest {
@Test
@Tag("flaky")
public void testRip() throws IOException {
PawooRipper ripper = new PawooRipper(new URL("https://pawoo.net/@halki/media"));
public void testRip() throws IOException, URISyntaxException {
PawooRipper ripper = new PawooRipper(new URI("https://pawoo.net/@halki/media").toURL());
testRipper(ripper);
}
}

View File

@ -7,6 +7,8 @@ import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
public class VscoRipperTest extends RippersTest {
@ -18,8 +20,8 @@ public class VscoRipperTest extends RippersTest {
*/
@Test
@Tag("flaky")
public void testSingleImageRip() throws IOException {
VscoRipper ripper = new VscoRipper(new URL("https://vsco.co/jonathangodoy/media/5d1aec76bb669a128035e98a"));
public void testSingleImageRip() throws IOException, URISyntaxException {
VscoRipper ripper = new VscoRipper(new URI("https://vsco.co/jonathangodoy/media/5d1aec76bb669a128035e98a").toURL());
testRipper(ripper);
}
@ -30,8 +32,8 @@ public class VscoRipperTest extends RippersTest {
* @throws IOException
*/
@Test
public void testHyphenatedRip() throws IOException {
VscoRipper ripper = new VscoRipper(new URL("https://vsco.co/jolly-roger/gallery"));
public void testHyphenatedRip() throws IOException, URISyntaxException {
VscoRipper ripper = new VscoRipper(new URI("https://vsco.co/jolly-roger/gallery").toURL());
testRipper(ripper);
}
@ -41,8 +43,8 @@ public class VscoRipperTest extends RippersTest {
* @throws IOException
*/
@Test
public void testGetGID() throws IOException {
URL url = new URL("https://vsco.co/jolly-roger/media/590359c4ade3041f2658f407");
public void testGetGID() throws IOException, URISyntaxException {
URL url = new URI("https://vsco.co/jolly-roger/media/590359c4ade3041f2658f407").toURL();
VscoRipper ripper = new VscoRipper(url);

View File

@ -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.WebtoonsRipper;
@ -9,23 +11,23 @@ import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
public class WebtoonsRipperTest extends RippersTest {
public class WebtoonsRipperTest extends RippersTest {
@Test
@Tag("flaky")
public void testWebtoonsAlbum() throws IOException {
WebtoonsRipper ripper = new WebtoonsRipper(new URL("https://www.webtoons.com/en/super-hero/unordinary/episode-103/viewer?title_no=679&episode_no=109"));
public void testWebtoonsAlbum() throws IOException, URISyntaxException {
WebtoonsRipper ripper = new WebtoonsRipper(new URI("https://www.webtoons.com/en/super-hero/unordinary/episode-103/viewer?title_no=679&episode_no=109").toURL());
testRipper(ripper);
}
@Test
@Tag("flaky")
public void testWedramabtoonsType() throws IOException {
WebtoonsRipper ripper = new WebtoonsRipper(new URL("http://www.webtoons.com/en/drama/lookism/ep-145/viewer?title_no=1049&episode_no=145"));
public void testWedramabtoonsType() throws IOException, URISyntaxException {
WebtoonsRipper ripper = new WebtoonsRipper(new URI("http://www.webtoons.com/en/drama/lookism/ep-145/viewer?title_no=1049&episode_no=145").toURL());
testRipper(ripper);
}
@Test
@Disabled("URL format different")
public void testGetGID() throws IOException {
URL url = new URL("https://www.webtoons.com/en/super-hero/unordinary/episode-103/viewer?title_no=679&episode_no=109");
public void testGetGID() throws IOException, URISyntaxException {
URL url = new URI("https://www.webtoons.com/en/super-hero/unordinary/episode-103/viewer?title_no=679&episode_no=109").toURL();
WebtoonsRipper ripper = new WebtoonsRipper(url);
Assertions.assertEquals("super-hero", ripper.getGID(url));
}

View File

@ -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.WordpressComicRipper;
@ -24,50 +26,50 @@ public class WordpressComicRipperTest extends RippersTest {
@Test
@Tag("flaky") // https://github.com/RipMeApp/ripme/issues/269 - Disabled test - WordpressRipperTest: various domains flaky in CI
public void test_totempole666() throws IOException {
public void test_totempole666() throws IOException, URISyntaxException {
WordpressComicRipper ripper = new WordpressComicRipper(
new URL("http://www.totempole666.com/comic/first-time-for-everything-00-cover/"));
new URI("http://www.totempole666.com/comic/first-time-for-everything-00-cover/").toURL());
testRipper(ripper);
}
@Test
@Tag("flaky") // https://github.com/RipMeApp/ripme/issues/269 - Disabled test - WordpressRipperTest: various domains flaky in CI
public void test_buttsmithy() throws IOException {
WordpressComicRipper ripper = new WordpressComicRipper(new URL("http://buttsmithy.com/archives/comic/p1"));
public void test_buttsmithy() throws IOException, URISyntaxException {
WordpressComicRipper ripper = new WordpressComicRipper(new URI("http://buttsmithy.com/archives/comic/p1").toURL());
testRipper(ripper);
}
@Test
@Tag("flaky") // https://github.com/RipMeApp/ripme/issues/269 - Disabled test - WordpressRipperTest: various domains flaky in CI
public void test_themonsterunderthebed() throws IOException {
public void test_themonsterunderthebed() throws IOException, URISyntaxException {
WordpressComicRipper ripper = new WordpressComicRipper(
new URL("http://themonsterunderthebed.net/?comic=test-post"));
new URI("http://themonsterunderthebed.net/?comic=test-post").toURL());
testRipper(ripper);
}
@Test
public void test_prismblush() throws IOException {
public void test_prismblush() throws IOException, URISyntaxException {
WordpressComicRipper ripper = new WordpressComicRipper(
new URL("http://prismblush.com/comic/hella-trap-pg-01/"));
new URI("http://prismblush.com/comic/hella-trap-pg-01/").toURL());
testRipper(ripper);
}
@Test
@Tag("flaky")
public void test_konradokonski_1() throws IOException {
public void test_konradokonski_1() throws IOException, URISyntaxException {
WordpressComicRipper ripper = new WordpressComicRipper(
new URL("http://www.konradokonski.com/sawdust/comic/get-up/"));
new URI("http://www.konradokonski.com/sawdust/comic/get-up/").toURL());
testRipper(ripper);
}
@Test
@Tag("flaky")
public void test_konradokonski_2() throws IOException {
public void test_konradokonski_2() throws IOException, URISyntaxException {
WordpressComicRipper ripper = new WordpressComicRipper(
new URL("http://www.konradokonski.com/wiory/comic/08182008/"));
new URI("http://www.konradokonski.com/wiory/comic/08182008/").toURL());
testRipper(ripper);
}
@Test
public void test_konradokonski_getAlbumTitle() throws IOException {
URL url = new URL("http://www.konradokonski.com/sawdust/comic/get-up/");
public void test_konradokonski_getAlbumTitle() throws IOException, URISyntaxException {
URL url = new URI("http://www.konradokonski.com/sawdust/comic/get-up/").toURL();
WordpressComicRipper ripper = new WordpressComicRipper(url);
Assertions.assertEquals("konradokonski.com_sawdust", ripper.getAlbumTitle(url));
@ -75,47 +77,47 @@ public class WordpressComicRipperTest extends RippersTest {
@Test
@Tag("flaky") // https://github.com/RipMeApp/ripme/issues/269 - Disabled test - WordpressRipperTest: various domains flaky in CI
public void test_freeadultcomix() throws IOException {
public void test_freeadultcomix() throws IOException, URISyntaxException {
WordpressComicRipper ripper = new WordpressComicRipper(
new URL("http://freeadultcomix.com/finders-feepaid-in-full-sparrow/"));
new URI("http://freeadultcomix.com/finders-feepaid-in-full-sparrow/").toURL());
testRipper(ripper);
}
@Test
@Tag("flaky")
public void test_delvecomic() throws IOException {
public void test_delvecomic() throws IOException, URISyntaxException {
WordpressComicRipper ripper = new WordpressComicRipper(
new URL("http://thisis.delvecomic.com/NewWP/comic/in-too-deep/"));
new URI("http://thisis.delvecomic.com/NewWP/comic/in-too-deep/").toURL());
testRipper(ripper);
}
@Test
public void test_Eightmuses_download() throws IOException {
public void test_Eightmuses_download() throws IOException, URISyntaxException {
WordpressComicRipper ripper = new WordpressComicRipper(
new URL("https://8muses.download/lustomic-playkittens-josh-samuel-porn-comics-8-muses/"));
new URI("https://8muses.download/lustomic-playkittens-josh-samuel-porn-comics-8-muses/").toURL());
testRipper(ripper);
}
@Test
public void test_Eightmuses_getAlbumTitle() throws IOException {
URL url = new URL("https://8muses.download/lustomic-playkittens-josh-samuel-porn-comics-8-muses/");
public void test_Eightmuses_getAlbumTitle() throws IOException, URISyntaxException {
URL url = new URI("https://8muses.download/lustomic-playkittens-josh-samuel-porn-comics-8-muses/").toURL();
WordpressComicRipper ripper = new WordpressComicRipper(url);
Assertions.assertEquals("8muses.download_lustomic-playkittens-josh-samuel-porn-comics-8-muses", ripper.getAlbumTitle(url));
}
@Test
public void test_spyingwithlana_download() throws IOException {
public void test_spyingwithlana_download() throws IOException, URISyntaxException {
WordpressComicRipper ripper = new WordpressComicRipper(
new URL("http://spyingwithlana.com/comic/the-big-hookup/"));
new URI("http://spyingwithlana.com/comic/the-big-hookup/").toURL());
testRipper(ripper);
}
@Test
public void test_spyingwithlana_getAlbumTitle() throws IOException {
URL url = new URL("http://spyingwithlana.com/comic/the-big-hookup/");
public void test_spyingwithlana_getAlbumTitle() throws IOException, URISyntaxException {
URL url = new URI("http://spyingwithlana.com/comic/the-big-hookup/").toURL();
WordpressComicRipper ripper = new WordpressComicRipper(url);
Assertions.assertEquals("spyingwithlana_the-big-hookup", ripper.getAlbumTitle(url));
}
@Test
@Tag("flaky") // https://github.com/RipMeApp/ripme/issues/269 - Disabled test - WordpressRipperTest: various domains flaky in CI
public void test_pepsaga() throws IOException {
WordpressComicRipper ripper = new WordpressComicRipper(new URL("http://shipinbottle.pepsaga.com/?p=281"));
public void test_pepsaga() throws IOException, URISyntaxException {
WordpressComicRipper ripper = new WordpressComicRipper(new URI("http://shipinbottle.pepsaga.com/?p=281").toURL());
testRipper(ripper);
}
}

View File

@ -6,13 +6,14 @@ import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.net.URL;
import java.net.URI;
import java.net.URISyntaxException;
public class XcartxRipperTest extends RippersTest {
@Test
@Disabled("Broken ripper")
public void testAlbum() throws IOException {
XcartxRipper ripper = new XcartxRipper(new URL("http://xcartx.com/4937-tokimeki-nioi.html"));
public void testAlbum() throws IOException, URISyntaxException {
XcartxRipper ripper = new XcartxRipper(new URI("http://xcartx.com/4937-tokimeki-nioi.html").toURL());
testRipper(ripper);
}
}

View File

@ -1,12 +1,13 @@
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.XhamsterRipper;
import org.jsoup.nodes.Document;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
@ -14,56 +15,56 @@ import org.junit.jupiter.api.Test;
public class XhamsterRipperTest extends RippersTest {
@Test
@Tag("flaky")
public void testXhamsterAlbum1() throws IOException {
XhamsterRipper ripper = new XhamsterRipper(new URL("https://xhamster.com/photos/gallery/sexy-preggo-girls-9026608"));
public void testXhamsterAlbum1() throws IOException, URISyntaxException {
XhamsterRipper ripper = new XhamsterRipper(new URI("https://xhamster.com/photos/gallery/sexy-preggo-girls-9026608").toURL());
testRipper(ripper);
}
@Test
@Tag("flaky")
public void testXhamster2Album() throws IOException {
XhamsterRipper ripper = new XhamsterRipper(new URL("https://xhamster2.com/photos/gallery/sexy-preggo-girls-9026608"));
public void testXhamster2Album() throws IOException, URISyntaxException {
XhamsterRipper ripper = new XhamsterRipper(new URI("https://xhamster2.com/photos/gallery/sexy-preggo-girls-9026608").toURL());
testRipper(ripper);
}
@Test
@Tag("flaky")
public void testXhamsterAlbum2() throws IOException {
XhamsterRipper ripper = new XhamsterRipper(new URL("https://xhamster.com/photos/gallery/japanese-dolls-4-asahi-mizuno-7254664"));
public void testXhamsterAlbum2() throws IOException, URISyntaxException {
XhamsterRipper ripper = new XhamsterRipper(new URI("https://xhamster.com/photos/gallery/japanese-dolls-4-asahi-mizuno-7254664").toURL());
testRipper(ripper);
}
@Test
@Tag("flaky")
public void testXhamsterAlbumOneDomain() throws IOException {
XhamsterRipper ripper = new XhamsterRipper(new URL("https://xhamster.one/photos/gallery/japanese-dolls-4-asahi-mizuno-7254664"));
public void testXhamsterAlbumOneDomain() throws IOException, URISyntaxException {
XhamsterRipper ripper = new XhamsterRipper(new URI("https://xhamster.one/photos/gallery/japanese-dolls-4-asahi-mizuno-7254664").toURL());
testRipper(ripper);
}
@Test
@Tag("flaky")
public void testXhamsterAlbumDesiDomain() throws IOException {
XhamsterRipper ripper = new XhamsterRipper(new URL("https://xhamster5.desi/photos/gallery/japanese-dolls-4-asahi-mizuno-7254664"));
public void testXhamsterAlbumDesiDomain() throws IOException, URISyntaxException {
XhamsterRipper ripper = new XhamsterRipper(new URI("https://xhamster5.desi/photos/gallery/japanese-dolls-4-asahi-mizuno-7254664").toURL());
testRipper(ripper);
}
@Test
@Tag("flaky")
public void testXhamsterVideo() throws IOException {
XhamsterRipper ripper = new XhamsterRipper(new URL("https://xhamster.com/videos/brazzers-busty-big-booty-milf-lisa-ann-fucks-her-masseur-1492828"));
public void testXhamsterVideo() throws IOException, URISyntaxException {
XhamsterRipper ripper = new XhamsterRipper(new URI("https://xhamster.com/videos/brazzers-busty-big-booty-milf-lisa-ann-fucks-her-masseur-1492828").toURL());
testRipper(ripper);
}
@Test
@Tag("flaky")
public void testBrazilianXhamster() throws IOException {
XhamsterRipper ripper = new XhamsterRipper(new URL("https://pt.xhamster.com/photos/gallery/cartoon-babe-15786301"));
public void testBrazilianXhamster() throws IOException, URISyntaxException {
XhamsterRipper ripper = new XhamsterRipper(new URI("https://pt.xhamster.com/photos/gallery/cartoon-babe-15786301").toURL());
testRipper(ripper);
}
@Test
public void testGetGID() throws IOException {
URL url = new URL("https://xhamster5.desi/photos/gallery/japanese-dolls-4-asahi-mizuno-7254664");
public void testGetGID() throws IOException, URISyntaxException {
URL url = new URI("https://xhamster5.desi/photos/gallery/japanese-dolls-4-asahi-mizuno-7254664").toURL();
XhamsterRipper ripper = new XhamsterRipper(url);
Assertions.assertEquals("7254664", ripper.getGID(url));
}
@Test
@Tag("flaky")
public void testGetNextPage() throws IOException {
XhamsterRipper ripper = new XhamsterRipper(new URL("https://pt.xhamster.com/photos/gallery/mega-compil-6-10728626"));
public void testGetNextPage() throws IOException, URISyntaxException {
XhamsterRipper ripper = new XhamsterRipper(new URI("https://pt.xhamster.com/photos/gallery/mega-compil-6-10728626").toURL());
Document doc = ripper.getFirstPage();
try {
ripper.getNextPage(doc);

View File

@ -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.XlecxRipper;
@ -11,8 +12,8 @@ import org.junit.jupiter.api.Test;
public class XlecxRipperTest extends RippersTest {
@Test
@Disabled("Broken ripper")
public void testAlbum() throws IOException {
XlecxRipper ripper = new XlecxRipper(new URL("http://xlecx.com/4274-black-canary-ravished-prey.html"));
public void testAlbum() throws IOException, URISyntaxException {
XlecxRipper ripper = new XlecxRipper(new URI("http://xlecx.com/4274-black-canary-ravished-prey.html").toURL());
testRipper(ripper);
}
}

View File

@ -1,15 +1,16 @@
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.XvideosRipper;
import org.junit.jupiter.api.Test;
public class XvideosRipperTest extends RippersTest {
@Test
public void testXhamsterAlbum1() throws IOException {
XvideosRipper ripper = new XvideosRipper(new URL("https://www.xvideos.com/video23515878/dee_s_pool_toys"));
public void testXhamsterAlbum1() throws IOException, URISyntaxException {
XvideosRipper ripper = new XvideosRipper(new URI("https://www.xvideos.com/video23515878/dee_s_pool_toys").toURL());
testRipper(ripper);
}

View File

@ -5,6 +5,8 @@ import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
@ -12,11 +14,11 @@ import java.util.List;
public class YoupornRipperTest extends RippersTest {
@Test
@Tag("flaky")
public void testYoupornRipper() throws IOException {
public void testYoupornRipper() throws IOException, URISyntaxException {
List<URL> contentURLs = new ArrayList<>();
// Video cannot be loaded: "Video has been flagged for verification"
//contentURLs.add(new URL("http://www.youporn.com/watch/7669155/mrs-li-amateur-69-orgasm/?from=categ"));
contentURLs.add(new URL("https://www.youporn.com/watch/13158849/smashing-star-slut-part-2/"));
//contentURLs.add(new URI("http://www.youporn.com/watch/7669155/mrs-li-amateur-69-orgasm/?from=categ").toURL());
contentURLs.add(new URI("https://www.youporn.com/watch/13158849/smashing-star-slut-part-2/").toURL());
for (URL url : contentURLs) {
YoupornRipper ripper = new YoupornRipper(url);
testRipper(ripper);

View File

@ -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.YuvutuRipper;
@ -9,18 +11,18 @@ import org.junit.jupiter.api.Test;
public class YuvutuRipperTest extends RippersTest {
@Test
public void testYuvutuAlbum1() throws IOException {
YuvutuRipper ripper = new YuvutuRipper(new URL("http://www.yuvutu.com/modules.php?name=YuGallery&action=view&set_id=127013"));
public void testYuvutuAlbum1() throws IOException, URISyntaxException {
YuvutuRipper ripper = new YuvutuRipper(new URI("http://www.yuvutu.com/modules.php?name=YuGallery&action=view&set_id=127013").toURL());
testRipper(ripper);
}
@Test
public void testYuvutuAlbum2() throws IOException {
YuvutuRipper ripper = new YuvutuRipper(new URL("http://www.yuvutu.com/modules.php?name=YuGallery&action=view&set_id=420333"));
public void testYuvutuAlbum2() throws IOException, URISyntaxException {
YuvutuRipper ripper = new YuvutuRipper(new URI("http://www.yuvutu.com/modules.php?name=YuGallery&action=view&set_id=420333").toURL());
testRipper(ripper);
}
public void testGetGID() throws IOException {
URL url = new URL("http://www.yuvutu.com/modules.php?name=YuGallery&action=view&set_id=420333");
public void testGetGID() throws IOException, URISyntaxException {
URL url = new URI("http://www.yuvutu.com/modules.php?name=YuGallery&action=view&set_id=420333").toURL();
YuvutuRipper ripper = new YuvutuRipper(url);
Assertions.assertEquals("420333", ripper.getGID(url));
}

View File

@ -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.ZizkiRipper;
@ -12,22 +14,22 @@ public class ZizkiRipperTest extends RippersTest {
@Test
@Tag("flaky")
public void testRip() throws IOException {
ZizkiRipper ripper = new ZizkiRipper(new URL("http://zizki.com/dee-chorde/we-got-spirit"));
public void testRip() throws IOException, URISyntaxException {
ZizkiRipper ripper = new ZizkiRipper(new URI("http://zizki.com/dee-chorde/we-got-spirit").toURL());
testRipper(ripper);
}
@Test
public void testGetGID() throws IOException {
URL url = new URL("http://zizki.com/dee-chorde/we-got-spirit");
public void testGetGID() throws IOException, URISyntaxException {
URL url = new URI("http://zizki.com/dee-chorde/we-got-spirit").toURL();
ZizkiRipper ripper = new ZizkiRipper(url);
Assertions.assertEquals("dee-chorde", ripper.getGID(url));
}
@Test
@Tag("flaky")
public void testAlbumTitle() throws IOException {
URL url = new URL("http://zizki.com/dee-chorde/we-got-spirit");
public void testAlbumTitle() throws IOException, URISyntaxException {
URL url = new URI("http://zizki.com/dee-chorde/we-got-spirit").toURL();
ZizkiRipper ripper = new ZizkiRipper(url);
Assertions.assertEquals("zizki_Dee Chorde_We Got Spirit", ripper.getAlbumTitle(url));
}