1
0
Fork 0
mirror of synced 2024-06-26 10:00:19 +12:00

Update archivebox/core/views.py

Cleaner handling of the archive methods input

Co-authored-by: Nick Sweeting <git@sweeting.me>
This commit is contained in:
BlipRanger 2020-12-10 12:45:30 -05:00 committed by GitHub
parent 7ce1f63183
commit 35809eab1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -138,9 +138,7 @@ class AddView(UserPassesTestMixin, FormView):
url = form.cleaned_data["url"]
print(f'[+] Adding URL: {url}')
depth = 0 if form.cleaned_data["depth"] == "0" else 1
extractors = ""
for extractor in form.cleaned_data["archiveMethods"]:
extractors = extractors + extractor + ','
extractors = ','.join(form.cleaned_data["archive_methods"])
input_kwargs = {
"urls": url,
"depth": depth,