Finished up Myhentaigallery ripper

This commit is contained in:
cyian-1756 2018-08-27 18:02:05 -04:00
parent 24448f9d6b
commit aa15ba83c5

View File

@ -38,7 +38,7 @@ public class MyhentaigalleryRipper extends AbstractHTMLRipper {
}
throw new MalformedURLException("Expected myhentaicomics.com URL format: " +
"myhentaicomics.com/index.php/albumName - got " + url + " instead");
"myhentaigallery.com/gallery/thumbnails/ID - got " + url + " instead");
}
@Override
@ -47,27 +47,6 @@ public class MyhentaigalleryRipper extends AbstractHTMLRipper {
return Http.url(url).get();
}
// @Override
// public Document getNextPage(Document doc) throws IOException {
// // Find next page
// String nextUrl = "";
// Element elem = doc.select("a.ui-icon-right").first();
// String nextPage = elem.attr("href");
// Pattern p = Pattern.compile("/index.php/[a-zA-Z0-9_-]*\\?page=\\d");
// Matcher m = p.matcher(nextPage);
// if (m.matches()) {
// nextUrl = "https://myhentaicomics.com" + m.group(0);
// }
// if (nextUrl.equals("")) {
// throw new IOException("No more pages");
// }
// // Sleep for half a sec to avoid getting IP banned
// sleep(500);
// return Http.url(nextUrl).get();
// }
@Override
public List<String> getURLsFromPage(Document doc) {
List<String> result = new ArrayList<>();