mirror of
https://github.com/kennethreitz/requests-html.git
synced 2026-06-05 23:00:20 +00:00
Merge pull request #11 from Chyroc/fix/links-contain-javascript
fix https://github.com/kennethreitz/requests-html/issues/10 : links contain javascript:;
This commit is contained in:
+1
-1
@@ -136,7 +136,7 @@ class HTML:
|
||||
for link in self.find('a'):
|
||||
try:
|
||||
href = link.attrs['href']
|
||||
if not href.startswith('#') and self.skip_anchors:
|
||||
if not href.startswith('#') and self.skip_anchors and href not in ['javascript:;']:
|
||||
yield href
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user