From 500fa3567013b9228c101f0dd127cf50ac2d6535 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Sun, 27 Aug 2017 22:29:44 +0200 Subject: [PATCH] Add default depth --- lookyloo/__init__.py | 2 ++ lookyloo/templates/scrap.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lookyloo/__init__.py b/lookyloo/__init__.py index 0829c31c..8010243d 100644 --- a/lookyloo/__init__.py +++ b/lookyloo/__init__.py @@ -40,6 +40,8 @@ def scrap(): if request.form.get('url'): url = request.form.get('url') depth = request.form.get('depth') + if depth is None: + depth = 1 items = crawl(SPLASH, url, depth) if not items: # broken diff --git a/lookyloo/templates/scrap.html b/lookyloo/templates/scrap.html index 8df33d2c..4fec1c64 100644 --- a/lookyloo/templates/scrap.html +++ b/lookyloo/templates/scrap.html @@ -8,7 +8,7 @@
- +