website-scraper
Advanced tools
Comparing version 3.3.5 to 3.3.6
@@ -64,3 +64,6 @@ 'use strict'; | ||
if (self.options.prettifyUrls) { | ||
relativePath = relativePath.replace(self.options.defaultFilename, ''); | ||
if (relativePath === self.options.defaultFilename | ||
|| relativePath.endsWith('/' + self.options.defaultFilename)) { | ||
relativePath = relativePath.slice(0, -self.options.defaultFilename.length); | ||
} | ||
} | ||
@@ -67,0 +70,0 @@ const hash = utils.getHashFromUrl(childPath); |
@@ -38,3 +38,7 @@ 'use strict'; | ||
const relativePath = path.relative(dirname, path2); | ||
return getUnixPath(relativePath); | ||
const escaped = relativePath | ||
.split(path.sep) | ||
.map(pathComponent => encodeURIComponent(pathComponent).replace(/['()]/g, c => '%' + c.charCodeAt(0).toString(16))) | ||
.join(path.sep); | ||
return getUnixPath(escaped); | ||
} | ||
@@ -41,0 +45,0 @@ |
{ | ||
"name": "website-scraper", | ||
"version": "3.3.5", | ||
"version": "3.3.6", | ||
"description": "Download website to a local directory (including all css, images, js, etc.)", | ||
@@ -5,0 +5,0 @@ "readmeFilename": "README.md", |
54700
1080