mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-11 00:14:12 +02:00
Improved naming
This commit is contained in:
@@ -250,11 +250,17 @@ public class FuraffinityRipper extends AbstractHTMLRipper {
|
|||||||
logger.info("Found URL " + link);
|
logger.info("Found URL " + link);
|
||||||
String[] fileNameSplit = link.split("/");
|
String[] fileNameSplit = link.split("/");
|
||||||
String fileName = fileNameSplit[fileNameSplit.length -1];
|
String fileName = fileNameSplit[fileNameSplit.length -1];
|
||||||
|
fileName = fileName.replaceAll("[0-9]*\\.", "");
|
||||||
|
String[] fileExtSplit = link.split("\\.");
|
||||||
|
String fileExt = fileExtSplit[fileExtSplit.length -1];
|
||||||
|
fileName = fileName.replaceAll(fileExt, "");
|
||||||
File saveAS;
|
File saveAS;
|
||||||
saveAS = new File(
|
saveAS = new File(
|
||||||
workingDir.getCanonicalPath()
|
workingDir.getCanonicalPath()
|
||||||
+ File.separator
|
+ File.separator
|
||||||
+ fileName);
|
+ fileName
|
||||||
|
+ "."
|
||||||
|
+ fileExt);
|
||||||
fileName = fileName.replace("[0-9]*\\.", "");
|
fileName = fileName.replace("[0-9]*\\.", "");
|
||||||
addURLToDownload(new URL(link),saveAS,"",cookies);
|
addURLToDownload(new URL(link),saveAS,"",cookies);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
Reference in New Issue
Block a user