mirror of
https://github.com/kennethreitz/requests-html.git
synced 2026-06-05 14:50:20 +00:00
Merge pull request #70 from camper42/ignore_js_links
ignore javascript links
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user