From 67e2451744af30b3ec2c221a7239dfba12e5c606 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Tue, 10 Jul 2018 13:24:56 -0400 Subject: [PATCH] Now properly names multi-part files; Updated to work with recent changes to site --- .../rarchives/ripme/ripper/rippers/LoveromRipper.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/LoveromRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/LoveromRipper.java index bddecf64..83af405f 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/LoveromRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/LoveromRipper.java @@ -55,7 +55,7 @@ public class LoveromRipper extends AbstractHTMLRipper { @Override public List getURLsFromPage(Document doc) { List result = new ArrayList<>(); - String downloadLink = doc.select("a#download_link").attr("href"); + String downloadLink = doc.select("a#start_download_link").attr("href"); if (downloadLink != null && !downloadLink.isEmpty()) { result.add(downloadLink); } else { @@ -69,7 +69,11 @@ public class LoveromRipper extends AbstractHTMLRipper { @Override public void downloadURL(URL url, int index) { - addURLToDownload(url, getPrefix(index)); + if (multipart) { + addURLToDownload(url, "", "", "", null, null, getPrefix(index)); + } else { + addURLToDownload(url); + } } @Override @@ -112,7 +116,7 @@ public class LoveromRipper extends AbstractHTMLRipper { public String getPrefix(int index) { String prefix = ""; if (keepSortOrder() && Utils.getConfigBoolean("download.save_order", true)) { - prefix = String.format("%03d_", index); + prefix = String.format("7z.%03d", index); } return prefix; }