From 6f462b45d7dd6bc5a0d49a3329c592d32c610b9f Mon Sep 17 00:00:00 2001 From: BlipRanger Date: Thu, 10 Dec 2020 12:46:16 -0500 Subject: [PATCH] Update archivebox/core/forms.py Cleaner handling of the ARCHIVE_METHODS values Co-authored-by: Nick Sweeting --- archivebox/core/forms.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/archivebox/core/forms.py b/archivebox/core/forms.py index 14893d96..25d393ad 100644 --- a/archivebox/core/forms.py +++ b/archivebox/core/forms.py @@ -10,18 +10,11 @@ CHOICES = ( ('1', 'depth = 1 (archive these URLs and all URLs one hop away)'), ) +from ..extractors import get_default_archive_methods + ARCHIVE_METHODS = [ - ('title', 'title'), - ('favicon', 'favicon'), - ('wget', 'wget'), - ('warc', 'warc'), - ('pdf', 'pdf'), - ('screenshot', 'screenshot'), - ('dom', 'dom'), - ('singlefile', 'singlefile'), - ('git', 'git'), - ('media', 'media'), - ('archive_org', 'archive_org'), + (name, name) + for name, _, _ in get_default_archive_methods() ]