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 f7b74133..df373689 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/WebtoonsRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/WebtoonsRipper.java @@ -71,7 +71,9 @@ public class WebtoonsRipper extends AbstractHTMLRipper { public List getURLsFromPage(Document doc) { List result = new ArrayList(); for (Element elem : doc.select("div.viewer_img > img")) { - result.add(elem.attr("data-url")); + String origUrl = elem.attr("data-url"); + String[] finalUrl = origUrl.split("\\?type"); + result.add(finalUrl[0]); } return result; } diff --git a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/WebtoonsRipperTest.java b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/WebtoonsRipperTest.java index 20cf17b8..4aa50d0a 100644 --- a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/WebtoonsRipperTest.java +++ b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/WebtoonsRipperTest.java @@ -10,4 +10,9 @@ public class WebtoonsRipperTest extends RippersTest { WebtoonsRipper ripper = new WebtoonsRipper(new URL("http://www.webtoons.com/en/drama/my-boo/ep-33/viewer?title_no=1185&episode_no=33")); testRipper(ripper); } + + public void testWebtoonsType() throws IOException { + WebtoonsRipper ripper = new WebtoonsRipper(new URL("http://www.webtoons.com/en/drama/lookism/ep-145/viewer?title_no=1049&episode_no=145")); + testRipper(ripper); + } }