mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-01 19:40:18 +02:00
fixed the vidble test URL
This commit is contained in:
@@ -5,8 +5,6 @@ import java.net.MalformedURLException;
|
|||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.nio.file.Files;
|
|
||||||
import java.nio.file.Paths;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
@@ -17,7 +15,6 @@ import org.jsoup.nodes.Element;
|
|||||||
|
|
||||||
import com.rarchives.ripme.ripper.AbstractHTMLRipper;
|
import com.rarchives.ripme.ripper.AbstractHTMLRipper;
|
||||||
import com.rarchives.ripme.ripper.DownloadThreadPool;
|
import com.rarchives.ripme.ripper.DownloadThreadPool;
|
||||||
import com.rarchives.ripme.ui.RipStatusMessage.STATUS;
|
|
||||||
import com.rarchives.ripme.utils.Http;
|
import com.rarchives.ripme.utils.Http;
|
||||||
import com.rarchives.ripme.utils.Utils;
|
import com.rarchives.ripme.utils.Utils;
|
||||||
import org.jsoup.select.Elements;
|
import org.jsoup.select.Elements;
|
||||||
@@ -72,8 +69,6 @@ public class MotherlessRipper extends AbstractHTMLRipper {
|
|||||||
@Override
|
@Override
|
||||||
public Document getNextPage(Document doc) throws IOException, URISyntaxException {
|
public Document getNextPage(Document doc) throws IOException, URISyntaxException {
|
||||||
|
|
||||||
Files.write(Paths.get("doc-next-page.txt"), doc.outerHtml().getBytes());
|
|
||||||
|
|
||||||
Elements nextPageLink = doc.head().select("link[rel=next]");
|
Elements nextPageLink = doc.head().select("link[rel=next]");
|
||||||
if (nextPageLink.isEmpty()) {
|
if (nextPageLink.isEmpty()) {
|
||||||
throw new IOException("Last page reached");
|
throw new IOException("Last page reached");
|
||||||
|
@@ -12,15 +12,15 @@ import org.junit.jupiter.api.Test;
|
|||||||
public class VidbleRipperTest extends RippersTest {
|
public class VidbleRipperTest extends RippersTest {
|
||||||
@Test
|
@Test
|
||||||
public void testVidbleRip() throws IOException, URISyntaxException {
|
public void testVidbleRip() throws IOException, URISyntaxException {
|
||||||
VidbleRipper ripper = new VidbleRipper(new URI("http://www.vidble.com/album/y1oyh3zd").toURL());
|
VidbleRipper ripper = new VidbleRipper(new URI("https://vidble.com/album/cGEFr8zi").toURL());
|
||||||
testRipper(ripper);
|
testRipper(ripper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetGID() throws IOException, URISyntaxException {
|
public void testGetGID() throws IOException, URISyntaxException {
|
||||||
URL url = new URI("http://www.vidble.com/album/y1oyh3zd").toURL();
|
URL url = new URI("https://vidble.com/album/cGEFr8zi").toURL();
|
||||||
VidbleRipper ripper = new VidbleRipper(url);
|
VidbleRipper ripper = new VidbleRipper(url);
|
||||||
Assertions.assertEquals("y1oyh3zd", ripper.getGID(url));
|
Assertions.assertEquals("cGEFr8zi", ripper.getGID(url));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user