浏览代码

fix: wget_output_path failing on some extractors. Add a new condition

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

+ 4 - 0
archivebox/extractors/wget.py

@@ -180,5 +180,9 @@ def wget_output_path(link: Link) -> Optional[str]:
 
         if str(search_dir) == link.link_dir:
             break
+    
+    search_dir = Path(link.link_dir) / domain(link.url).replace(":", "+") / urldecode(full_path)
+    if not search_dir.is_dir():
+        return str(search_dir.relative_to(link.link_dir))
 
     return None