mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-22 21:43:06 +02:00
Added ability to create urls.txt before appending to it.
This commit is contained in:
@@ -336,7 +336,7 @@ public abstract class AbstractHTMLRipper extends AbstractRipper {
|
||||
Path urlFile = Paths.get(this.workingDir + "/urls.txt");
|
||||
String text = url.toExternalForm() + System.lineSeparator();
|
||||
try {
|
||||
Files.write(urlFile, text.getBytes(StandardCharsets.UTF_8), StandardOpenOption.APPEND);
|
||||
Files.write(urlFile, text.getBytes(StandardCharsets.UTF_8), StandardOpenOption.CREATE, StandardOpenOption.APPEND);
|
||||
itemsCompleted.put(url, urlFile);
|
||||
} catch (IOException e) {
|
||||
LOGGER.error("Error while writing to " + urlFile, e);
|
||||
|
@@ -165,7 +165,7 @@ public abstract class AbstractJSONRipper extends AbstractRipper {
|
||||
Path urlFile = Paths.get(this.workingDir + "/urls.txt");
|
||||
String text = url.toExternalForm() + System.lineSeparator();
|
||||
try {
|
||||
Files.write(urlFile, text.getBytes(StandardCharsets.UTF_8), StandardOpenOption.APPEND);
|
||||
Files.write(urlFile, text.getBytes(StandardCharsets.UTF_8), StandardOpenOption.CREATE, StandardOpenOption.APPEND);
|
||||
itemsCompleted.put(url, urlFile);
|
||||
} catch (IOException e) {
|
||||
LOGGER.error("Error while writing to " + urlFile, e);
|
||||
|
@@ -74,7 +74,7 @@ public abstract class AlbumRipper extends AbstractRipper {
|
||||
Path urlFile = Paths.get(this.workingDir + "/urls.txt");
|
||||
String text = url.toExternalForm() + System.lineSeparator();
|
||||
try {
|
||||
Files.write(urlFile, text.getBytes(StandardCharsets.UTF_8), StandardOpenOption.APPEND);
|
||||
Files.write(urlFile, text.getBytes(StandardCharsets.UTF_8), StandardOpenOption.CREATE, StandardOpenOption.APPEND);
|
||||
itemsCompleted.put(url, urlFile);
|
||||
} catch (IOException e) {
|
||||
LOGGER.error("Error while writing to " + urlFile, e);
|
||||
|
Reference in New Issue
Block a user