diff --git a/requests_html.py b/requests_html.py index 82a72c2..41ce614 100644 --- a/requests_html.py +++ b/requests_html.py @@ -212,7 +212,7 @@ class BaseParser: try: href = link.attrs['href'].strip() - if href and not (href.startswith('#') and self.skip_anchors and href in ['javascript:;']): + if href and not (href.startswith('#') and self.skip_anchors) and not href.startswith('javascript:'): yield href except KeyError: pass