diff --git a/archivebox/core/migrations/0008_auto_20201228_1718.py b/archivebox/core/migrations/0008_auto_20201228_1718.py deleted file mode 100644 index 1a86ed9e..00000000 --- a/archivebox/core/migrations/0008_auto_20201228_1718.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.1.3 on 2020-12-28 17:18 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('core', '0007_archiveresult'), - ] - - operations = [ - migrations.AlterField( - model_name='archiveresult', - name='extractor', - field=models.CharField(choices=['title', 'wget'], max_length=32), - ), - ] diff --git a/archivebox/extractors/wget.py b/archivebox/extractors/wget.py index 6b7b10a4..29f0ff76 100644 --- a/archivebox/extractors/wget.py +++ b/archivebox/extractors/wget.py @@ -51,7 +51,7 @@ def should_save_wget(snapshot: Model, out_dir: Optional[Path]=None) -> bool: def save_wget(snapshot: Model, out_dir: Optional[Path]=None, timeout: int=TIMEOUT) -> ArchiveResult: """download full site using wget""" - out_dir = out_dir or link.link_dir + out_dir = out_dir or snapshot.snapshot_dir if SAVE_WARC: warc_dir = out_dir / "warc" warc_dir.mkdir(exist_ok=True) @@ -183,8 +183,8 @@ def wget_output_path(snapshot: Model) -> Optional[str]: if str(search_dir) == snapshot.snapshot_dir: break - search_dir = Path(link.link_dir) / domain(link.url).replace(":", "+") / urldecode(full_path) + search_dir = Path(snapshot.snapshot_dir) / domain(snapshot.url).replace(":", "+") / urldecode(full_path) if not search_dir.is_dir(): - return str(search_dir.relative_to(link.link_dir)) + return str(search_dir.relative_to(snapshot.snapshot_dir)) return None