From a37965338c9daffcc64b983877294a2d2bb3d901 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Wed, 29 May 2019 18:02:54 +0800 Subject: [PATCH] added automatic extraction of fields functionality --- crawlab/routes/spiders.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crawlab/routes/spiders.py b/crawlab/routes/spiders.py index 62c84650..d4f99a3a 100644 --- a/crawlab/routes/spiders.py +++ b/crawlab/routes/spiders.py @@ -523,7 +523,7 @@ class SpiderApi(BaseApi): tags = [] for tag in sel.iter(): if tag.tag == 'a': - if not tag.get('href').startswith('#') and not tag.get('href').startswith('javascript'): + if tag.get('href') is not None and not tag.get('href').startswith('#') and not tag.get('href').startswith('javascript'): tags.append(tag) return tags