mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-24 19:54:25 -04:00
fix: post-rebase issues
This commit is contained in:
parent
075d310a9f
commit
a36f36866f
2 changed files with 3 additions and 21 deletions
|
@ -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),
|
||||
),
|
||||
]
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue