class ManganeloRipper extends AbstractHTMLRipper {

    public ManganeloRipper(URL url) throws IOException {
        super(url);
    }

    @Override
    public String getHost() {
        return "manganelo";
    }

    @Override
    public String getDomain() {
        return "manganelo.com";
    }

    @Override
    public String getGID(URL url) throws MalformedURLException {
        Pattern p = Pattern.compile("https?://manganelo.com/manga/([\\S]+)/?$");
        Matcher m = p.matcher(url.toExternalForm());
        if (m.matches()) {
            return m.group(1);
        }

        p = Pattern.compile("https?://manganelo.com/chapter/([\\S]+)/([\\S_\\-]+)/?$");
        m = p.matcher(url.toExternalForm());
        if (m.matches()) {
            return m.group(1);
        }
        throw new MalformedURLException("Expected manganelo URL format: " +
                "/manganelo.com/manga/ID - got " + url + " instead");
    }

    @Override
    public Document getFirstPage() throws IOException {
        // "url" is an instance field of the superclass
        return Http.url(url).get();
    }

    @Override
    public Document getNextPage(Document doc) throws IOException {
        Element elem = doc.select("div.btn-navigation-chap > a.back").first();
        if (elem == null) {
            throw new IOException("No more pages");
        } else {
            return Http.url(elem.attr("href")).get();
        }
    }

    private List<String> getURLsFromChap(String url) {
        List<String> result = new ArrayList<>();
        try {
            Document doc = Http.url(url).get();

            return getURLsFromChap(doc);
        } catch (IOException e) {
            return null;
        }

    }

    private List<String> getURLsFromChap(Document doc) {
        LOGGER.debug("Getting urls from " + doc.location());
        List<String> result = new ArrayList<>();
        for (Element el : doc.select(".vung-doc > img")) {
            result.add(el.attr("src"));
        }
        return result;
    }

    @Override
    public List<String> getURLsFromPage(Document doc) {<FILL_FUNCTION_BODY>}

    @Override
    public void downloadURL(URL url, int index) {
        addURLToDownload(url, getPrefix(index));
    }
}

        List<String> result = new ArrayList<>();
        List<String> urlsToGrab = new ArrayList<>();
        if (url.toExternalForm().contains("/manga/")) {
            for (Element el : doc.select("div.chapter-list > div.row > span > a")) {
                urlsToGrab.add(el.attr("href"));
            }
            Collections.reverse(urlsToGrab);

            for (String url : urlsToGrab) {
                result.addAll(getURLsFromChap(url));
            }
        } else if (url.toExternalForm().contains("/chapter/")) {
            result.addAll(getURLsFromChap(doc));
        }
        return result;
    
<methods>public boolean addURLToDownload(java.net.URL, java.io.File, java.lang.String, Map<java.lang.String,java.lang.String>, java.lang.Boolean) ,public boolean addURLToDownload(java.net.URL, java.io.File) ,public boolean canRip(java.net.URL) ,public void downloadCompleted(java.net.URL, java.io.File) ,public void downloadErrored(java.net.URL, java.lang.String) ,public void downloadExists(java.net.URL, java.io.File) ,public int getCompletionPercentage() ,public int getCount() ,public abstract java.lang.String getHost() ,public Document getNextPage(Document) throws java.io.IOException,public java.lang.String getStatusText() ,public void rip() throws java.io.IOException,public java.net.URL sanitizeURL(java.net.URL) throws java.net.MalformedURLException,public boolean saveText(java.net.URL, java.lang.String, java.lang.String, int) ,public void setWorkingDir(java.net.URL) throws java.io.IOException<variables>private Map<java.net.URL,java.io.File> itemsCompleted,private Map<java.net.URL,java.lang.String> itemsErrored,private Map<java.net.URL,java.io.File> itemsPending