Przeglądaj źródła

Update archivebox/core/views.py

Cleaner handling of the archive methods input

Co-authored-by: Nick Sweeting <[email protected]>

BlipRanger 5 lat temu
rodzic
commit
35809eab1c
1 zmienionych plików z 1 dodań i 3 usunięć
  1. 1 3
      archivebox/core/views.py

+ 1 - 3
archivebox/core/views.py

@@ -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,