Various style cleanup.
This commit is contained in:
parent
9410ea806c
commit
d8d7b5096a
@ -98,7 +98,6 @@ public class App {
|
|||||||
}
|
}
|
||||||
if (cl.hasOption('R')) {
|
if (cl.hasOption('R')) {
|
||||||
loadHistory();
|
loadHistory();
|
||||||
|
|
||||||
if (HISTORY.toList().size() == 0) {
|
if (HISTORY.toList().size() == 0) {
|
||||||
System.err.println("There are no history entries to re-rip. Rip some albums first");
|
System.err.println("There are no history entries to re-rip. Rip some albums first");
|
||||||
System.exit(-1);
|
System.exit(-1);
|
||||||
@ -142,29 +141,21 @@ public class App {
|
|||||||
// change the default rips directory
|
// change the default rips directory
|
||||||
Utils.setConfigString("rips.directory", cl.getOptionValue('l'));
|
Utils.setConfigString("rips.directory", cl.getOptionValue('l'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cl.hasOption('f')) {
|
if (cl.hasOption('f')) {
|
||||||
|
|
||||||
String filename = cl.getOptionValue('f');
|
String filename = cl.getOptionValue('f');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
String url;
|
String url;
|
||||||
|
|
||||||
BufferedReader br = new BufferedReader(new FileReader(filename));
|
BufferedReader br = new BufferedReader(new FileReader(filename));
|
||||||
while((url = br.readLine()) != null) {
|
while((url = br.readLine()) != null) {
|
||||||
// loop through each url in the file and proces each url individually.
|
// loop through each url in the file and proces each url individually.
|
||||||
ripURL(url.trim(), cl.hasOption("n"));
|
ripURL(url.trim(), cl.hasOption("n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (FileNotFoundException fne) {
|
} catch (FileNotFoundException fne) {
|
||||||
logger.error("[!] File containing list of URLs not found. Cannot continue.");
|
logger.error("[!] File containing list of URLs not found. Cannot continue.");
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
logger.error("[!] Failed reading file containing list of URLs. Cannot continue.");
|
logger.error("[!] Failed reading file containing list of URLs. Cannot continue.");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cl.hasOption('u')) {
|
if (cl.hasOption('u')) {
|
||||||
String url = cl.getOptionValue('u').trim();
|
String url = cl.getOptionValue('u').trim();
|
||||||
ripURL(url, cl.hasOption("n"));
|
ripURL(url, cl.hasOption("n"));
|
||||||
|
@ -150,7 +150,6 @@ public abstract class AbstractRipper
|
|||||||
return addURLToDownload(url, saveFileAs, referrer, cookies);
|
return addURLToDownload(url, saveFileAs, referrer, cookies);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Queues file to be downloaded and saved. With options.
|
* Queues file to be downloaded and saved. With options.
|
||||||
* @param url
|
* @param url
|
||||||
|
@ -17,7 +17,6 @@ import com.rarchives.ripme.ripper.rippers.ripperhelpers.ChanSite;
|
|||||||
import com.rarchives.ripme.utils.Http;
|
import com.rarchives.ripme.utils.Http;
|
||||||
import com.rarchives.ripme.utils.RipUtils;
|
import com.rarchives.ripme.utils.RipUtils;
|
||||||
|
|
||||||
|
|
||||||
public class ChanRipper extends AbstractHTMLRipper {
|
public class ChanRipper extends AbstractHTMLRipper {
|
||||||
public static List<ChanSite> explicit_domains = Arrays.asList(
|
public static List<ChanSite> explicit_domains = Arrays.asList(
|
||||||
new ChanSite(Arrays.asList("boards.4chan.org"), Arrays.asList("4cdn.org", "is.4chan.org", "is2.4chan.org")),
|
new ChanSite(Arrays.asList("boards.4chan.org"), Arrays.asList("4cdn.org", "is.4chan.org", "is2.4chan.org")),
|
||||||
@ -195,7 +194,6 @@ public class ChanRipper extends AbstractHTMLRipper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<URL> urls = RipUtils.getFilesFromURL(originalURL);
|
List<URL> urls = RipUtils.getFilesFromURL(originalURL);
|
||||||
//for (int i = 0; i < urls.size(); i++) {
|
|
||||||
for(URL imageurl : urls){
|
for(URL imageurl : urls){
|
||||||
imageURLs.add(imageurl.toString());
|
imageURLs.add(imageurl.toString());
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,6 @@ import org.json.JSONException;
|
|||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
public class History {
|
public class History {
|
||||||
|
|
||||||
private final List<HistoryEntry> list;
|
private final List<HistoryEntry> list;
|
||||||
private static final String[] COLUMNS = new String[] {
|
private static final String[] COLUMNS = new String[] {
|
||||||
"URL",
|
"URL",
|
||||||
@ -144,5 +143,4 @@ public class History {
|
|||||||
os.close();
|
os.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,6 @@ import org.jsoup.Jsoup;
|
|||||||
import org.jsoup.nodes.Document;
|
import org.jsoup.nodes.Document;
|
||||||
|
|
||||||
import com.rarchives.ripme.utils.Utils;
|
import com.rarchives.ripme.utils.Utils;
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
public class UpdateUtils {
|
public class UpdateUtils {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user