mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-03-20 06:52:39 +10:00
refactor: Change add() to receive url and depth instead of import_str and import_path
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user