This commit is contained in:
shaunpud
2018-03-11 19:53:54 +08:00
parent bcb0881d15
commit d55bcfb34f
+1 -1
View File
@@ -294,7 +294,7 @@ class BaseParser:
try:
href = link.attrs['href'].strip()
if href and not (href.startswith('#') and self.skip_anchors) and not href.startswith('javascript:') and not href.startswith('mailto:'):
if href and not (href.startswith('#') and self.skip_anchors) and not href.startswith(('javascript:', 'mailto:')):
yield href
except KeyError:
pass