« get me outta code hell

More http crawler tweaking - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2018-12-22 14:36:54 -0400
committerFlorrie <towerofnix@gmail.com>2018-12-22 14:36:54 -0400
commitdad157a7e36668b78d865d93c66e5a9fd324773d (patch)
treef2e749f1d5baa553425720776996c421cab098a1
parent5e743aec52ad22ab36ba1dbcca68ddc1cad14240 (diff)
More http crawler tweaking
-rw-r--r--crawlers.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawlers.js b/crawlers.js
index 8583d5c..fc1cccf 100644
--- a/crawlers.js
+++ b/crawlers.js
@@ -75,8 +75,8 @@ function crawlHTTP(absURL, opts = {}, internals = {}) {
           name = name.trim()
 
           let base
-          if (path.extname(absURL)) {
-            base = path.dirname(absURL) + '/'
+          if (path.extname(absURLObj.pathname)) {
+            base = absURLObj.origin + path.dirname(absURLObj.pathname) + '/'
           } else {
             base = absURL
           }