1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-22 21:43:06 +02:00

Added getAlbumTitle support to hentaifox ripper

This commit is contained in:
cyian-1756
2019-04-05 07:45:30 -04:00
parent e769922a35
commit eb75f9db1e

View File

@@ -58,6 +58,19 @@ public class HentaifoxRipper extends AbstractHTMLRipper {
return result;
}
@Override
public String getAlbumTitle(URL url) throws MalformedURLException {
try {
Document doc = getFirstPage();
String title = doc.select("div.info > h1").first().text();
return getHost() + "_" + title + "_" + getGID(url);
} catch (Exception e) {
// Fall back to default album naming convention
LOGGER.warn("Failed to get album title from " + url, e);
}
return super.getAlbumTitle(url);
}
@Override
public void downloadURL(URL url, int index) {
addURLToDownload(url, getPrefix(index));