From e323495b657b6d215fb8814f5d989d685eb03e92 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Sat, 19 Aug 2017 00:27:00 -0400 Subject: [PATCH] Webtoon ripper can now rip from all pages --- .../ripme/ripper/rippers/WebtoonsRipper.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/WebtoonsRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/WebtoonsRipper.java index dba049cc..96471c72 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/WebtoonsRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/WebtoonsRipper.java @@ -88,4 +88,16 @@ public class WebtoonsRipper extends AbstractHTMLRipper { cookies = resp.cookies(); return Http.url(url).get(); } + + @Override + public Document getNextPage(Document doc) throws IOException { + // Find next page + String nextUrl = ""; + Element elem = doc.select("a.pg_next").first(); + nextUrl = elem.attr("href"); + if (nextUrl == "") { + throw new IOException("No more pages"); + } + return Http.url(nextUrl).get(); + } }