Skip to content

Commit

Permalink
Improved remove_unlikely_candidates following an advice from issue #102
Browse files Browse the repository at this point in the history
  • Loading branch information
buriy committed May 7, 2018
1 parent 97e86c4 commit 537de2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readability/readability.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ def score_node(self, elem):
}

def remove_unlikely_candidates(self):
for elem in self.html.iter():
for elem in self.html.findall('.//*'):
s = "%s %s" % (elem.get('class', ''), elem.get('id', ''))
if len(s) < 2:
continue
Expand Down

0 comments on commit 537de2b

Please sign in to comment.