浏览代码

add fallback to check wget output dir with port stripped

Nick Sweeting 1 年之前
父节点
当前提交
0a25495520
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      archivebox/extractors/wget.py

+ 5 - 0
archivebox/extractors/wget.py

@@ -202,4 +202,9 @@ def wget_output_path(link: Link) -> Optional[str]:
     if search_dir.is_dir():
     if search_dir.is_dir():
         return domain(link.url).replace(":", "+")
         return domain(link.url).replace(":", "+")
 
 
+    # fallback to just the domain dir without port
+    search_dir = Path(link.link_dir) / domain(link.url).split(":", 1)[0]
+    if search_dir.is_dir():
+        return domain(link.url).split(":", 1)[0]
+
     return None
     return None