Merge remote-tracking branch 'upstream/master'

This commit is contained in:
digitalnoise 2018-09-12 16:57:09 -05:00
commit 312a4fba12
4 changed files with 22 additions and 2 deletions

View File

@ -50,6 +50,12 @@ public class JagodibujaRipper extends AbstractHTMLRipper {
public List<String> getURLsFromPage(Document doc) { public List<String> getURLsFromPage(Document doc) {
List<String> result = new ArrayList<>(); List<String> result = new ArrayList<>();
for (Element comicPageUrl : doc.select("div.gallery-icon > a")) { for (Element comicPageUrl : doc.select("div.gallery-icon > a")) {
// Check if the ripper has been stopped
try {
stopCheck();
} catch (IOException e) {
return result;
}
try { try {
sleep(500); sleep(500);
Document comicPage = Http.url(comicPageUrl.attr("href")).get(); Document comicPage = Http.url(comicPageUrl.attr("href")).get();

View File

@ -2,6 +2,7 @@ package com.rarchives.ripme.tst.ripper.rippers;
import com.rarchives.ripme.ripper.rippers.ImgurRipper; import com.rarchives.ripme.ripper.rippers.ImgurRipper;
import com.rarchives.ripme.ripper.rippers.ImgurRipper.ImgurAlbum; import com.rarchives.ripme.ripper.rippers.ImgurRipper.ImgurAlbum;
import com.rarchives.ripme.utils.RipUtils;
import java.io.IOException; import java.io.IOException;
import java.net.URL; import java.net.URL;
@ -69,6 +70,11 @@ public class ImgurRipperTest extends RippersTest {
assertTrue("Failed to find 100 files from " + album.url.toExternalForm() + ", only got " + album.images.size(), album.images.size() >= 100); assertTrue("Failed to find 100 files from " + album.url.toExternalForm() + ", only got " + album.images.size(), album.images.size() >= 100);
} }
public void testImgurVideoFromGetFilesFromURL() throws Exception {
List<URL> urls = RipUtils.getFilesFromURL(new URL("https://i.imgur.com/4TtwxRN.gifv"));
assertEquals("https://i.imgur.com/4TtwxRN.mp4", urls.get(0).toExternalForm());
}
/* /*
// Imgur seems to be really flaky with this huge album, or the album was removed or something. // Imgur seems to be really flaky with this huge album, or the album was removed or something.
// Navigating to this link results in an "over capacity" warning on the page. // Navigating to this link results in an "over capacity" warning on the page.

View File

@ -6,5 +6,9 @@ import java.net.URL;
import com.rarchives.ripme.ripper.rippers.JagodibujaRipper; import com.rarchives.ripme.ripper.rippers.JagodibujaRipper;
public class JagodibujaRipperTest extends RippersTest { public class JagodibujaRipperTest extends RippersTest {
// TODO add a test public void testJagodibujaRipper() throws IOException {
// a photo set
JagodibujaRipper ripper = new JagodibujaRipper(new URL("http://www.jagodibuja.com/comic-in-me/"));
testRipper(ripper);
}
} }

View File

@ -6,5 +6,9 @@ import java.net.URL;
import com.rarchives.ripme.ripper.rippers.PahealRipper; import com.rarchives.ripme.ripper.rippers.PahealRipper;
public class PahealRipperTest extends RippersTest { public class PahealRipperTest extends RippersTest {
// TODO add a test public void testPahealRipper() throws IOException {
// a photo set
PahealRipper ripper = new PahealRipper(new URL("http://rule34.paheal.net/post/list/bimbo/1"));
testRipper(ripper);
}
} }