mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-20 04:31:55 +02:00
new URI instead of new URL in tests, 11.
This commit is contained in:
@@ -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.PhotobucketRipper;
|
||||
@@ -13,9 +15,9 @@ public class PhotobucketRipperTest extends RippersTest {
|
||||
|
||||
@Test
|
||||
@Disabled("https://github.com/RipMeApp/ripme/issues/229 : Disabled test (temporary) : BasicRippersTest#testPhotobucketRip (timing out)")
|
||||
public void testPhotobucketRip() throws IOException {
|
||||
public void testPhotobucketRip() throws IOException, URISyntaxException {
|
||||
PhotobucketRipper ripper = new PhotobucketRipper(
|
||||
new URL("http://s844.photobucket.com/user/SpazzySpizzy/library/Album%20Covers?sort=3&page=1"));
|
||||
new URI("http://s844.photobucket.com/user/SpazzySpizzy/library/Album%20Covers?sort=3&page=1").toURL());
|
||||
testRipper(ripper);
|
||||
deleteSubdirs(ripper.getWorkingDir());
|
||||
deleteDir(ripper.getWorkingDir());
|
||||
@@ -23,12 +25,12 @@ public class PhotobucketRipperTest extends RippersTest {
|
||||
|
||||
@Test
|
||||
@Disabled("new test, still disabled out because of the issue above, since this test also involves network IO.")
|
||||
public void testGetNextPage() throws IOException {
|
||||
public void testGetNextPage() throws IOException, URISyntaxException {
|
||||
// this album should have more than enough sub-albums and pages
|
||||
// to serve as a pretty good iteration test (barring server or
|
||||
// network errors)
|
||||
String baseURL = "http://s1255.photobucket.com/user/mimajki/library/Movie%20gifs?sort=6&page=1";
|
||||
URL url = new URL(baseURL);
|
||||
URL url = new URI(baseURL).toURL();
|
||||
PhotobucketRipper ripper = new PhotobucketRipper(url);
|
||||
org.jsoup.nodes.Document page = ripper.getFirstPage();
|
||||
// NOTE: number of pages remaining includes the subalbums
|
||||
@@ -47,17 +49,17 @@ public class PhotobucketRipperTest extends RippersTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetGID() throws IOException {
|
||||
URL url = new URL(
|
||||
"http://s732.photobucket.com/user/doublesix66/library/Army%20Painter%20examples?sort=3&page=1");
|
||||
public void testGetGID() throws IOException, URISyntaxException {
|
||||
URL url = new URI(
|
||||
"http://s732.photobucket.com/user/doublesix66/library/Army%20Painter%20examples?sort=3&page=1").toURL();
|
||||
PhotobucketRipper ripper = new PhotobucketRipper(url);
|
||||
Assertions.assertEquals("doublesix66", ripper.getGID(url));
|
||||
url = new URL(
|
||||
"http://s732.photobucket.com/user/doublesix66/library/Army%20Painter%20examples/Painting%20examples?page=1&sort=3");
|
||||
url = new URI(
|
||||
"http://s732.photobucket.com/user/doublesix66/library/Army%20Painter%20examples/Painting%20examples?page=1&sort=3").toURL();
|
||||
Assertions.assertEquals("doublesix66", ripper.getGID(url));
|
||||
url = new URL("http://s844.photobucket.com/user/SpazzySpizzy/library/Album%20Covers");
|
||||
url = new URI("http://s844.photobucket.com/user/SpazzySpizzy/library/Album%20Covers").toURL();
|
||||
Assertions.assertEquals("SpazzySpizzy", ripper.getGID(url));
|
||||
url = new URL("http://s844.photobucket.com/user/SpazzySpizzy/library");
|
||||
url = new URI("http://s844.photobucket.com/user/SpazzySpizzy/library").toURL();
|
||||
Assertions.assertEquals("SpazzySpizzy", ripper.getGID(url));
|
||||
}
|
||||
}
|
@@ -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.PichunterRipper;
|
||||
|
||||
@@ -11,18 +12,18 @@ import org.junit.jupiter.api.Test;
|
||||
public class PichunterRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testPichunterModelPageRip() throws IOException {
|
||||
public void testPichunterModelPageRip() throws IOException, URISyntaxException {
|
||||
// A non-photoset
|
||||
PichunterRipper ripper = new PichunterRipper(new URL("https://www.pichunter.com/models/Madison_Ivy"));
|
||||
PichunterRipper ripper = new PichunterRipper(new URI("https://www.pichunter.com/models/Madison_Ivy").toURL());
|
||||
testRipper(ripper);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testPichunterGalleryRip() throws IOException {
|
||||
public void testPichunterGalleryRip() throws IOException, URISyntaxException {
|
||||
// a photo set
|
||||
PichunterRipper ripper = new PichunterRipper(
|
||||
new URL("http://www.pichunter.com/gallery/3270642/Its_not_only_those_who"));
|
||||
new URI("http://www.pichunter.com/gallery/3270642/Its_not_only_those_who").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.PorncomixRipper;
|
||||
|
||||
public class PorncomixRipperTest extends RippersTest {
|
||||
public void testPorncomixAlbum() throws IOException {
|
||||
PorncomixRipper ripper = new PorncomixRipper(new URL("http://www.porncomix.info/lust-unleashed-desire-to-submit/"));
|
||||
public void testPorncomixAlbum() throws IOException, URISyntaxException {
|
||||
PorncomixRipper ripper = new PorncomixRipper(new URI("http://www.porncomix.info/lust-unleashed-desire-to-submit/").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.PorncomixinfoRipper;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
@@ -10,8 +11,8 @@ import org.junit.jupiter.api.Test;
|
||||
public class PorncomixinfoRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testRip() throws IOException {
|
||||
PorncomixinfoRipper ripper = new PorncomixinfoRipper(new URL("https://porncomixinfo.net/chapter/alx-come-to-naught-down-in-flames-up-in-smoke-tracy-scops/alx-come-to-naught-down-in-flames-up-in-smoke-tracy-scops/"));
|
||||
public void testRip() throws IOException, URISyntaxException {
|
||||
PorncomixinfoRipper ripper = new PorncomixinfoRipper(new URI("https://porncomixinfo.net/chapter/alx-come-to-naught-down-in-flames-up-in-smoke-tracy-scops/alx-come-to-naught-down-in-flames-up-in-smoke-tracy-scops/").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 com.rarchives.ripme.ripper.rippers.SinfestRipper;
|
||||
@@ -11,14 +13,14 @@ import org.junit.jupiter.api.Test;
|
||||
public class SinfestRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testRip() throws IOException {
|
||||
SinfestRipper ripper = new SinfestRipper(new URL("http://sinfest.net/view.php?date=2000-01-17"));
|
||||
public void testRip() throws IOException, URISyntaxException {
|
||||
SinfestRipper ripper = new SinfestRipper(new URI("http://sinfest.net/view.php?date=2000-01-17").toURL());
|
||||
testRipper(ripper);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetGID() throws IOException {
|
||||
URL url = new URL("http://sinfest.net/view.php?date=2000-01-17");
|
||||
public void testGetGID() throws IOException, URISyntaxException {
|
||||
URL url = new URI("http://sinfest.net/view.php?date=2000-01-17").toURL();
|
||||
SinfestRipper ripper = new SinfestRipper(url);
|
||||
Assertions.assertEquals("2000-01-17", ripper.getGID(url));
|
||||
}
|
||||
|
@@ -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.SmuttyRipper;
|
||||
@@ -11,14 +13,14 @@ import org.junit.jupiter.api.Test;
|
||||
public class SmuttyRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testRip() throws IOException {
|
||||
SmuttyRipper ripper = new SmuttyRipper(new URL("https://smutty.com/user/QUIGON/"));
|
||||
public void testRip() throws IOException, URISyntaxException {
|
||||
SmuttyRipper ripper = new SmuttyRipper(new URI("https://smutty.com/user/QUIGON/").toURL());
|
||||
testRipper(ripper);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetGID() throws IOException {
|
||||
URL url = new URL("https://smutty.com/user/QUIGON/");
|
||||
public void testGetGID() throws IOException, URISyntaxException {
|
||||
URL url = new URI("https://smutty.com/user/QUIGON/").toURL();
|
||||
SmuttyRipper ripper = new SmuttyRipper(url);
|
||||
Assertions.assertEquals("QUIGON", ripper.getGID(url));
|
||||
}
|
||||
|
@@ -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.SpankbangRipper;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
@@ -10,8 +11,8 @@ import org.junit.jupiter.api.Test;
|
||||
public class SpankBangRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testSpankBangVideo() throws IOException {
|
||||
SpankbangRipper ripper = new SpankbangRipper(new URL("https://spankbang.com/2a7fh/video/mdb901")); //most popular video of all time on site; should stay up
|
||||
public void testSpankBangVideo() throws IOException, URISyntaxException {
|
||||
SpankbangRipper ripper = new SpankbangRipper(new URI("https://spankbang.com/2a7fh/video/mdb901").toURL()); //most popular video of all time on site; should stay up
|
||||
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 com.rarchives.ripme.ripper.rippers.StaRipper;
|
||||
@@ -12,15 +14,15 @@ import org.junit.jupiter.api.Test;
|
||||
public class StaRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Disabled("Ripper broken, Nullpointer exception")
|
||||
public void testRip() throws IOException {
|
||||
StaRipper ripper = new StaRipper(new URL("https://sta.sh/01umpyuxi4js"));
|
||||
public void testRip() throws IOException, URISyntaxException {
|
||||
StaRipper ripper = new StaRipper(new URI("https://sta.sh/01umpyuxi4js").toURL());
|
||||
testRipper(ripper);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled
|
||||
public void testGetGID() throws IOException {
|
||||
URL url = new URL("https://sta.sh/01umpyuxi4js");
|
||||
public void testGetGID() throws IOException, URISyntaxException {
|
||||
URL url = new URI("https://sta.sh/01umpyuxi4js").toURL();
|
||||
StaRipper ripper = new StaRipper(url);
|
||||
Assertions.assertEquals("01umpyuxi4js", ripper.getGID(url));
|
||||
}
|
||||
|
@@ -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.video.StickyXXXRipper;
|
||||
// import com.rarchives.ripme.tst.ripper.rippers.RippersTest;
|
||||
@@ -9,10 +10,10 @@ import com.rarchives.ripme.utils.Utils;
|
||||
|
||||
public class StickyXXXRipperTest extends RippersTest {
|
||||
|
||||
public void testStickyXXXVideo() throws IOException {
|
||||
public void testStickyXXXVideo() throws IOException, URISyntaxException {
|
||||
// This test fails on the CI - possibly due to checking for a file before it's written - so we're skipping it
|
||||
if (Utils.getConfigBoolean("test.run_flaky_tests", false)) {
|
||||
StickyXXXRipper ripper = new StickyXXXRipper(new URL("http://www.stickyxxx.com/a-very-intense-farewell/"));
|
||||
StickyXXXRipper ripper = new StickyXXXRipper(new URI("http://www.stickyxxx.com/a-very-intense-farewell/").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 com.rarchives.ripme.ripper.rippers.TeenplanetRipper;
|
||||
@@ -11,14 +13,14 @@ import org.junit.jupiter.api.Test;
|
||||
public class TeenplanetRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Tag("flaky")
|
||||
public void testTeenplanetRip() throws IOException {
|
||||
TeenplanetRipper ripper = new TeenplanetRipper(new URL("http://teenplanet.org/galleries/the-perfect-side-of-me-6588.html"));
|
||||
public void testTeenplanetRip() throws IOException, URISyntaxException {
|
||||
TeenplanetRipper ripper = new TeenplanetRipper(new URI("http://teenplanet.org/galleries/the-perfect-side-of-me-6588.html").toURL());
|
||||
testRipper(ripper);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetGID() throws IOException {
|
||||
URL url = new URL("http://teenplanet.org/galleries/the-perfect-side-of-me-6588.html");
|
||||
public void testGetGID() throws IOException, URISyntaxException {
|
||||
URL url = new URI("http://teenplanet.org/galleries/the-perfect-side-of-me-6588.html").toURL();
|
||||
TeenplanetRipper ripper = new TeenplanetRipper(url);
|
||||
Assertions.assertEquals("the-perfect-side-of-me-6588", ripper.getGID(url));
|
||||
}
|
||||
|
Reference in New Issue
Block a user