mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 06:34:25 -04:00
refactor: Change add() to receive url and depth instead of import_str and import_path
This commit is contained in:
parent
c1d8a74e4f
commit
f12bfeb322
3 changed files with 15 additions and 30 deletions
|
@ -66,12 +66,10 @@ class AddLinks(View):
|
|||
if form.is_valid():
|
||||
url = form.cleaned_data["url"]
|
||||
print(f'[+] Adding URL: {url}')
|
||||
if form.cleaned_data["source"] == "url":
|
||||
key = "import_str"
|
||||
else:
|
||||
key = "import_path"
|
||||
depth = 0 if form.cleaned_data["source"] == "url" else 1
|
||||
input_kwargs = {
|
||||
key: url,
|
||||
"url": url,
|
||||
"depth": depth,
|
||||
"update_all": False,
|
||||
"out_dir": OUTPUT_DIR,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue