Merge pull request #129 from shaunpud/master

Shorten
This commit is contained in:
2018-03-11 08:06:21 -04:00
committed by GitHub
+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