Skip to content

Commit 537de2b

Browse files
committed
Improved remove_unlikely_candidates following an advice from issue #102
1 parent 97e86c4 commit 537de2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

readability/readability.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def score_node(self, elem):
395395
}
396396

397397
def remove_unlikely_candidates(self):
398-
for elem in self.html.iter():
398+
for elem in self.html.findall('.//*'):
399399
s = "%s %s" % (elem.get('class', ''), elem.get('id', ''))
400400
if len(s) < 2:
401401
continue

0 commit comments

Comments
 (0)