1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-27 07:44:20 +02:00

Added an else block so the pdf download unit test wouldn't fail

This commit is contained in:
cyian-1756
2018-12-31 07:45:52 -05:00
parent 2558414b1c
commit a5ddf86d08

View File

@@ -135,6 +135,7 @@ public class HentaifoundryRipper extends AbstractHTMLRipper {
// this if is for ripping pdf stories
if (url.toExternalForm().contains("/stories/")) {
for (Element pdflink : doc.select("a.pdfLink")) {
LOGGER.info("grabbing " + "http://www.hentai-foundry.com" + pdflink.attr("href"));
imageURLs.add("http://www.hentai-foundry.com" + pdflink.attr("href"));
}
return imageURLs;
@@ -177,8 +178,9 @@ public class HentaifoundryRipper extends AbstractHTMLRipper {
// When downloading pdfs you *NEED* to end the cookies with the request or you just get the consent page
if (url.toExternalForm().endsWith(".pdf")) {
addURLToDownload(url, getPrefix(index), "", this.url.toExternalForm(), cookies);
} else {
addURLToDownload(url, getPrefix(index));
}
addURLToDownload(url, getPrefix(index));
}
}