Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ public WordpressComicRipper(URL url) throws IOException {
"shipinbottle.pepsaga.com",
"8muses.download",
"spyingwithlana.com",
"comixfap.net"
"comixfap.net",
"manytoon.me",
"manhwahentai.me"
);

private static List<String> theme1 = Arrays.asList(
Expand All @@ -58,6 +60,11 @@ public WordpressComicRipper(URL url) throws IOException {
"spyingwithlana.com"
);

private static List<String> webtoonTheme = Arrays.asList(
"manhwahentai.me",
"manytoon.me"
);

@Override
public String getHost() {
return url.toExternalForm().split("/")[2];
Expand Down Expand Up @@ -176,6 +183,18 @@ public boolean canRip(URL url) {
if (mat.matches()) {
return true;
}

pat = Pattern.compile("https?://manytoon.me/manhwa/([a-zA-Z0-9_-]+)/chapter-\\d+/?$");
mat = pat.matcher(url.toExternalForm());
if (mat.matches()) {
return true;
}

pat = Pattern.compile("https://manhwahentai.me/webtoon/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-])+/?");
mat = pat.matcher(url.toExternalForm());
if (mat.matches()) {
return true;
}
}


Expand Down Expand Up @@ -299,6 +318,19 @@ public String getAlbumTitle(URL url) throws MalformedURLException {
return "comixfap_" + mat.group(1);
}

pat = Pattern.compile("https?://manytoon.me/manhwa/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-])+/?");
mat = pat.matcher(url.toExternalForm());
if (mat.matches()) {
return "manytoon.me_" + mat.group(1) + "_" + mat.group(2);
}

pat = Pattern.compile("https://manhwahentai.me/webtoon/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-])+/?");
mat = pat.matcher(url.toExternalForm());
if (mat.matches()) {
return "manhwahentai.me_" + mat.group(1) + "_" + mat.group(2);
}


return super.getAlbumTitle(url);
}

Expand Down Expand Up @@ -371,6 +403,11 @@ public List<String> getURLsFromPage(Document doc) {
}

result.add(elem.attr("src"));
} else if (webtoonTheme.contains(getHost())) {
for (Element el : doc.select("img.wp-manga-chapter-img")) {
LOGGER.info(el.toString());
result.add(getWebtoonImageUrl(el));
}
}

// freeadultcomix gets it own if because it needs to add http://freeadultcomix.com to the start of each link
Expand Down Expand Up @@ -406,6 +443,14 @@ public List<String> getURLsFromPage(Document doc) {
return result;
}

private String getWebtoonImageUrl(Element el) {
if (el.attr("src").contains("http")) {
return el.attr("src");
} else {
return el.attr("data-src");
}
}

@Override
public void downloadURL(URL url, int index) {
// Download the url with the page title as the prefix
Expand Down