Merge pull request #396 from aaether32323/Webtoons_Ripper

Make webtoons ripper download maximum quality images
This commit is contained in:
cyian-1756 2018-01-18 11:59:40 -05:00 committed by GitHub
commit 8c6f3c4336
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -71,7 +71,9 @@ public class WebtoonsRipper extends AbstractHTMLRipper {
public List<String> getURLsFromPage(Document doc) {
List<String> result = new ArrayList<String>();
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;
}

View File

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