1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-20 12:42:06 +02:00

new URI instead of new URL in tests, 5.

This commit is contained in:
soloturn
2023-06-13 06:40:57 +02:00
parent 2bb79a4eac
commit ab8bb3187e
4 changed files with 26 additions and 20 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.FooktubeRipper;
import org.junit.jupiter.api.Disabled;
@@ -10,8 +11,8 @@ import org.junit.jupiter.api.Test;
public class FooktubeRipperTest extends RippersTest {
@Test
@Disabled("test or ripper broken")
public void testFooktubeVideo() throws IOException {
FooktubeRipper ripper = new FooktubeRipper(new URL("https://fooktube.com/video/641/in-the-cinema")); //pick any video from the front page
public void testFooktubeVideo() throws IOException, URISyntaxException {
FooktubeRipper ripper = new FooktubeRipper(new URI("https://fooktube.com/video/641/in-the-cinema").toURL()); //pick any video from the front page
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.FuraffinityRipper;
@@ -11,26 +13,26 @@ import org.junit.jupiter.api.Test;
public class FuraffinityRipperTest extends RippersTest {
@Test
@Tag("slow")
public void testFuraffinityAlbum() throws IOException {
FuraffinityRipper ripper = new FuraffinityRipper(new URL("https://www.furaffinity.net/gallery/spencerdragon/"));
public void testFuraffinityAlbum() throws IOException, URISyntaxException {
FuraffinityRipper ripper = new FuraffinityRipper(new URI("https://www.furaffinity.net/gallery/spencerdragon/").toURL());
testRipper(ripper);
}
@Test
@Tag("slow")
public void testFuraffinityScrap() throws IOException {
FuraffinityRipper ripper = new FuraffinityRipper(new URL("http://www.furaffinity.net/scraps/sssonic2/"));
public void testFuraffinityScrap() throws IOException, URISyntaxException {
FuraffinityRipper ripper = new FuraffinityRipper(new URI("http://www.furaffinity.net/scraps/sssonic2/").toURL());
testRipper(ripper);
}
@Test
public void testGetGID() throws IOException {
URL url = new URL("https://www.furaffinity.net/gallery/mustardgas/");
public void testGetGID() throws IOException, URISyntaxException {
URL url = new URI("https://www.furaffinity.net/gallery/mustardgas/").toURL();
FuraffinityRipper ripper = new FuraffinityRipper(url);
Assertions.assertEquals("mustardgas", ripper.getGID(url));
}
@Test
public void testLogin() throws IOException {
URL url = new URL("https://www.furaffinity.net/gallery/mustardgas/");
public void testLogin() throws IOException, URISyntaxException {
URL url = new URI("https://www.furaffinity.net/gallery/mustardgas/").toURL();
FuraffinityRipper ripper = new FuraffinityRipper(url);
// Check if the first page contain the username of ripmes shared account
boolean containsUsername = ripper.getFirstPage().html().contains("ripmethrowaway");

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.FuskatorRipper;
import org.junit.jupiter.api.Disabled;
@@ -10,14 +11,14 @@ import org.junit.jupiter.api.Test;
public class FuskatorRipperTest extends RippersTest {
@Test
@Disabled("test or ripper broken")
public void testFuskatorAlbum() throws IOException {
FuskatorRipper ripper = new FuskatorRipper(new URL("https://fuskator.com/thumbs/hqt6pPXAf9z/Shaved-Blonde-Babe-Katerina-Ambre.html"));
public void testFuskatorAlbum() throws IOException, URISyntaxException {
FuskatorRipper ripper = new FuskatorRipper(new URI("https://fuskator.com/thumbs/hqt6pPXAf9z/Shaved-Blonde-Babe-Katerina-Ambre.html").toURL());
testRipper(ripper);
}
@Test
@Disabled("test or ripper broken")
public void testUrlsWithTiled() throws IOException {
FuskatorRipper ripper = new FuskatorRipper(new URL("https://fuskator.com/thumbs/hsrzk~UIFmJ/Blonde-Babe-Destiny-Dixon-Playing-With-Black-Dildo.html"));
public void testUrlsWithTiled() throws IOException, URISyntaxException {
FuskatorRipper ripper = new FuskatorRipper(new URI("https://fuskator.com/thumbs/hsrzk~UIFmJ/Blonde-Babe-Destiny-Dixon-Playing-With-Black-Dildo.html").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.GfycatporntubeRipper;
@@ -11,14 +13,14 @@ import org.junit.jupiter.api.Test;
public class GfycatporntubeRipperTest extends RippersTest {
@Test
@Tag("flaky")
public void testRip() throws IOException {
GfycatporntubeRipper ripper = new GfycatporntubeRipper(new URL("https://gfycatporntube.com/blowjob-bunny-puts-on-a-show/"));
public void testRip() throws IOException, URISyntaxException {
GfycatporntubeRipper ripper = new GfycatporntubeRipper(new URI("https://gfycatporntube.com/blowjob-bunny-puts-on-a-show/").toURL());
testRipper(ripper);
}
@Test
public void testGetGID() throws IOException {
URL url = new URL("https://gfycatporntube.com/blowjob-bunny-puts-on-a-show/");
public void testGetGID() throws IOException, URISyntaxException {
URL url = new URI("https://gfycatporntube.com/blowjob-bunny-puts-on-a-show/").toURL();
GfycatporntubeRipper ripper = new GfycatporntubeRipper(url);
Assertions.assertEquals("blowjob-bunny-puts-on-a-show", ripper.getGID(url));
}