From 0a2549552077a1f154c9e17de93cee29e0ec1b29 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Fri, 19 Jan 2024 03:34:07 -0800 Subject: [PATCH] add fallback to check wget output dir with port stripped --- archivebox/extractors/wget.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/archivebox/extractors/wget.py b/archivebox/extractors/wget.py index d4e09aa3..f3057271 100644 --- a/archivebox/extractors/wget.py +++ b/archivebox/extractors/wget.py @@ -202,4 +202,9 @@ def wget_output_path(link: Link) -> Optional[str]: if search_dir.is_dir(): 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