class EromeRipper extends AbstractHTMLRipper {

    private static final String EROME_REFERER = "https://www.erome.com/";

    boolean rippingProfile;


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

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

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

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

    @Override
    public boolean hasQueueSupport() {
        return true;
    }

    @Override
    public boolean pageContainsAlbums(URL url) {
        Pattern pa = Pattern.compile("https?://www.erome.com/([a-zA-Z0-9_\\-?=]*)/?");
        Matcher ma = pa.matcher(url.toExternalForm());
        return ma.matches();
    }

    @Override
    public List<String> getAlbumsToQueue(Document doc) {
        List<String> urlsToAddToQueue = new ArrayList<>();
        for (Element elem : doc.select("div#albums > div.album > a")) {
            urlsToAddToQueue.add(elem.attr("href"));
        }
        return urlsToAddToQueue;
    }

    @Override
    public String getAlbumTitle(URL url) throws MalformedURLException {
            try {
                // Attempt to use album title as GID
                Element titleElement = getFirstPage().select("meta[property=og:title]").first();
                String title = titleElement.attr("content");
                title = title.substring(title.lastIndexOf('/') + 1);
                return getHost() + "_" + getGID(url) + "_" + title.trim();
            } catch (IOException e) {
                // Fall back to default album naming convention
                LOGGER.info("Unable to find title at " + url);
            } catch (NullPointerException e) {
                return getHost() + "_" + getGID(url);
            }
            return super.getAlbumTitle(url);
    }

    @Override
    public URL sanitizeURL(URL url) throws MalformedURLException {
        return new URL(url.toExternalForm().replaceAll("https?://erome.com", "https://www.erome.com"));
    }


    @Override
    public List<String> getURLsFromPage(Document doc) {
        List<String> URLs = new ArrayList<>();
        return getMediaFromPage(doc);
    }

    @Override
    public Document getFirstPage() throws IOException {
        Response resp = Http.url(this.url)
                            .ignoreContentType()
                            .response();

        return resp.parse();
    }

    @Override
    public String getGID(URL url) throws MalformedURLException {<FILL_FUNCTION_BODY>}

    private List<String> getMediaFromPage(Document doc) {
        List<String> results = new ArrayList<>();
        for (Element el : doc.select("img.img-front")) {
			if (el.hasAttr("src")) {
				if (el.attr("src").startsWith("https:")) {
					results.add(el.attr("src"));
				} else {
					results.add("https:" + el.attr("src"));
				}
			} else if (el.hasAttr("data-src")) {
				//to add images that are not loaded( as all images are lasyloaded as we scroll).
				results.add(el.attr("data-src"));
			}

		}
        for (Element el : doc.select("source[label=HD]")) {
            if (el.attr("src").startsWith("https:")) {
                results.add(el.attr("src"));
            }
            else {
                results.add("https:" + el.attr("src"));
            }
        }
        for (Element el : doc.select("source[label=SD]")) {
            if (el.attr("src").startsWith("https:")) {
                results.add(el.attr("src"));
            }
            else {
                results.add("https:" + el.attr("src"));
            }
        }
        return results;
    }

}

        Pattern p = Pattern.compile("^https?://www.erome.com/[ai]/([a-zA-Z0-9]*)/?$");
        Matcher m = p.matcher(url.toExternalForm());
        if (m.matches()) {
            return m.group(1);
        }

        p = Pattern.compile("^https?://www.erome.com/([a-zA-Z0-9_\\-?=]+)/?$");
        m = p.matcher(url.toExternalForm());

        if (m.matches()) {
            return m.group(1);
        }

        throw new MalformedURLException("erome album not found in " + url + ", expected https://www.erome.com/album");
    
<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