Now properly names multi-part files; Updated to work with recent changes to site
This commit is contained in:
parent
13dd2694b4
commit
67e2451744
@ -55,7 +55,7 @@ public class LoveromRipper extends AbstractHTMLRipper {
|
|||||||
@Override
|
@Override
|
||||||
public List<String> getURLsFromPage(Document doc) {
|
public List<String> getURLsFromPage(Document doc) {
|
||||||
List<String> result = new ArrayList<>();
|
List<String> 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()) {
|
if (downloadLink != null && !downloadLink.isEmpty()) {
|
||||||
result.add(downloadLink);
|
result.add(downloadLink);
|
||||||
} else {
|
} else {
|
||||||
@ -69,7 +69,11 @@ public class LoveromRipper extends AbstractHTMLRipper {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void downloadURL(URL url, int index) {
|
public void downloadURL(URL url, int index) {
|
||||||
addURLToDownload(url, getPrefix(index));
|
if (multipart) {
|
||||||
|
addURLToDownload(url, "", "", "", null, null, getPrefix(index));
|
||||||
|
} else {
|
||||||
|
addURLToDownload(url);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -112,7 +116,7 @@ public class LoveromRipper extends AbstractHTMLRipper {
|
|||||||
public String getPrefix(int index) {
|
public String getPrefix(int index) {
|
||||||
String prefix = "";
|
String prefix = "";
|
||||||
if (keepSortOrder() && Utils.getConfigBoolean("download.save_order", true)) {
|
if (keepSortOrder() && Utils.getConfigBoolean("download.save_order", true)) {
|
||||||
prefix = String.format("%03d_", index);
|
prefix = String.format("7z.%03d", index);
|
||||||
}
|
}
|
||||||
return prefix;
|
return prefix;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user