added automatic extraction of fields functionality

This commit is contained in:
Marvin Zhang
2019-05-29 18:02:54 +08:00
parent 7492c34c4a
commit a37965338c

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