1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-22 05:23:06 +02:00

Added ability to create urls.txt before appending to it.

This commit is contained in:
noesterle
2022-10-19 21:50:06 -04:00
committed by soloturn
parent d1a5057dcc
commit 07b90ddb78
3 changed files with 3 additions and 3 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);