diff --git a/archivebox/core/views.py b/archivebox/core/views.py index 7ce4eb82..399f368e 100644 --- a/archivebox/core/views.py +++ b/archivebox/core/views.py @@ -72,7 +72,8 @@ class LinkDetails(View): # slug is a timestamp by_ts = {page.timestamp: page for page in all_pages} try: - response = static.serve(request, archivefile, by_ts[slug].link_dir, show_indexes=True) + # print('SERVING STATICFILE', by_ts[slug].link_dir, request.path, path) + response = static.serve(request, archivefile, document_root=by_ts[slug].link_dir, show_indexes=True) response["Link"] = f'<{by_ts[slug].url}>; rel="canonical"' return response except KeyError: diff --git a/archivebox/extractors/__init__.py b/archivebox/extractors/__init__.py index d67325ac..ce51d4f8 100644 --- a/archivebox/extractors/__init__.py +++ b/archivebox/extractors/__init__.py @@ -110,7 +110,7 @@ def archive_link(link: Link, overwrite: bool=False, out_dir: Optional[str]=None) @enforce_types -def archive_links(links: List[Link], out_dir: Optional[str]=None) -> List[Link]: +def archive_links(links: List[Link], overwrite: bool=False, methods: Optional[Iterable[str]]=None, out_dir: Optional[str]=None) -> List[Link]: if not links: return [] @@ -119,7 +119,7 @@ def archive_links(links: List[Link], out_dir: Optional[str]=None) -> List[Link]: link: Link = links[0] try: for idx, link in enumerate(links): - archive_link(link, out_dir=link.link_dir) + archive_link(link, overwrite=overwrite, methods=methods, out_dir=link.link_dir) except KeyboardInterrupt: log_archiving_paused(len(links), idx, link.timestamp) raise SystemExit(0) diff --git a/archivebox/main.py b/archivebox/main.py index 00bf90e5..b6996b5e 100644 --- a/archivebox/main.py +++ b/archivebox/main.py @@ -673,7 +673,7 @@ def update(resume: Optional[float]=None, # Step 3: Run the archive methods for each link to_archive = new_links if only_new else all_links - archive_links(to_archive, out_dir=out_dir) + archive_links(to_archive, overwrite=overwrite, out_dir=out_dir) # Step 4: Re-write links index with updated titles, icons, and resources all_links = load_main_index(out_dir=out_dir)