浏览代码

fix: Wget absolute path generating issues

Cristian 5 年之前
父节点
当前提交
abde871a3c
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      archivebox/extractors/wget.py
  2. 1 1
      archivebox/themes/legacy/main_index_row.html

+ 1 - 1
archivebox/extractors/wget.py

@@ -179,7 +179,7 @@ def wget_output_path(link: Link) -> Optional[str]:
                     if re.search(".+\\.[Ss]?[Hh][Tt][Mm][Ll]?$", str(f), re.I | re.M)
                 ]
                 if html_files:
-                    return str(html_files[0])
+                    return str(html_files[0].relative_to(link.link_dir))
 
         # Move up one directory level
         search_dir = search_dir.parent

+ 1 - 1
archivebox/themes/legacy/main_index_row.html

@@ -2,7 +2,7 @@
     <td title="$timestamp">$bookmarked_date</td>
     <td class="title-col">
         <a href="$archive_path/index.html" class="link-url"><img src="$favicon_url" class="link-favicon" decoding="async"></a>
-        <a href="$wget_url" title="$title">
+        <a href="$archive_path/$wget_url" title="$title">
             <span data-title-for="$url" data-archived="$is_archived">$title</span>
             <small style="float:right">$tags</small>
         </a>