Improved naming

This commit is contained in:
cyian-1756 2017-03-23 20:40:15 -04:00
parent ee949ed487
commit be093b069a

View File

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