Merge pull request #930 from cyian-1756/JagodibujaRipperTest

Added Jagodibuja ripper test
This commit is contained in:
cyian-1756 2018-09-12 17:35:15 -04:00 committed by GitHub
commit 6ac5f27196
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 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

@ -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);
}
} }