1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-01-17 20:58:31 +01:00

new URI instead of new URL.

This commit is contained in:
soloturn 2023-10-28 01:56:26 +02:00
parent dd6ac9bc12
commit 95b0af4cfd
2 changed files with 7 additions and 5 deletions

View File

@ -1,13 +1,14 @@
package com.rarchives.ripme.ripper.rippers; package com.rarchives.ripme.ripper.rippers;
import com.rarchives.ripme.ripper.AbstractHTMLRipper; import com.rarchives.ripme.ripper.AbstractHTMLRipper;
import com.rarchives.ripme.utils.Http;
import org.jsoup.nodes.Document; import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element; import org.jsoup.nodes.Element;
import org.jsoup.select.Elements; import org.jsoup.select.Elements;
import java.io.IOException; import java.io.IOException;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL; import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -18,8 +19,8 @@ public class SoundgasmRipper extends AbstractHTMLRipper {
private static final String HOST = "soundgasm.net"; private static final String HOST = "soundgasm.net";
public SoundgasmRipper(URL url) throws IOException { public SoundgasmRipper(URL url) throws IOException, URISyntaxException {
super(new URL(url.toExternalForm())); super(new URI(url.toExternalForm()).toURL());
} }
@Override @Override

View File

@ -8,20 +8,21 @@ import org.junit.jupiter.api.Test;
import java.io.IOException; import java.io.IOException;
import java.net.URI; import java.net.URI;
import java.net.URISyntaxException; import java.net.URISyntaxException;
import java.net.URL;
public class SoundgasmRipperTest extends RippersTest { public class SoundgasmRipperTest extends RippersTest {
@Test @Test
@Tag("flaky") @Tag("flaky")
public void testSoundgasmURLs() throws IOException, URISyntaxException { public void testSoundgasmURLs() throws IOException, URISyntaxException {
SoundgasmRipper ripper = new SoundgasmRipper(new URI("https://soundgasm.net/u/_Firefly_xoxo/Rambles-with-my-Lovense").toURL()); SoundgasmRipper ripper = new SoundgasmRipper(new URI("https://soundgasm.net/u/HTMLExamples/Making-Text-into-a-Soundgasm-Audio-Link").toURL());
testRipper(ripper); testRipper(ripper);
} }
@Test @Test
@Tag("flaky") @Tag("flaky")
public void testRedditSoundgasmURL() throws IOException, URISyntaxException { public void testRedditSoundgasmURL() throws IOException, URISyntaxException {
RedditRipper ripper = new RedditRipper(new URI("https://www.reddit.com/r/gonewildaudio/comments/kn1bvj/f4m_mistress_controlled_my_lovense_while_i_tried/").toURL()); RedditRipper ripper = new RedditRipper(new URI("https://www.reddit.com/user/Mistress_Minerva/").toURL());
testRipper(ripper); testRipper(ripper);
} }
} }