added automatic extraction of fields functionality

This commit is contained in:
Marvin Zhang
2019-05-29 18:02:54 +08:00
parent 925f643cd8
commit 543fe61445

View File

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