diff --git a/archivebox/core/models.py b/archivebox/core/models.py index 655a01c5..bdffddc5 100644 --- a/archivebox/core/models.py +++ b/archivebox/core/models.py @@ -213,7 +213,6 @@ class Snapshot(models.Model): return self.history['title'][-1].output.strip() return None - @cached_property def domain(self) -> str: from ..util import domain diff --git a/archivebox/main.py b/archivebox/main.py index f1032181..f2ac951c 100644 --- a/archivebox/main.py +++ b/archivebox/main.py @@ -576,7 +576,7 @@ def add(urls: Union[str, List[str]], log_crawl_started(new_snapshots) for new_snapshot in new_snapshots: # TODO: Check if we need to add domain to the Snapshot model - downloaded_file = save_file_as_source(new_snapshot.url, filename=f'{new_snapshot.timestamp}-crawl-{new_snapshot.url}.txt', out_dir=out_dir) + downloaded_file = save_file_as_source(new_snapshot.url, filename=f'{new_snapshot.timestamp}-crawl-{new_snapshot.domain}.txt', out_dir=out_dir) new_snapshots_depth += parse_snapshots_from_source(downloaded_file, root_url=new_snapshot.url) imported_snapshots = [Snapshot(url=snapshot.url) for snapshot in new_snapshots + new_snapshots_depth]