Skip to content

Commit 35792e7

Browse files
committed
garden
1 parent aa51283 commit 35792e7

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

src/readability_lxml/readability.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ def summary(self, enclose_with_html_tag=False):
159159
self.remove_unlikely_candidates()
160160
self.transform_misused_divs_into_paragraphs()
161161
candidates = self.score_paragraphs()
162-
163162
best_candidate = self.select_best_candidate(candidates)
164163

165164
if best_candidate:
@@ -249,6 +248,7 @@ def select_best_candidate(self, candidates):
249248
sorted_candidates = sorted(candidates.values(),
250249
key=lambda x: x['content_score'],
251250
reverse=True)
251+
252252
for candidate in sorted_candidates[:5]:
253253
elem = candidate['elem']
254254
self.debug("Top 5 : %6.3f %s" % (

src/tests/test_article_only.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,3 @@ def test_si_sample_html_partial(self):
3636
doc = Document(sample, url='http://sportsillustrated.cnn.com/baseball/mlb/gameflash/2012/04/16/40630_preview.html')
3737
res = doc.summary(enclose_with_html_tag=True)
3838
self.assertEqual('<div><div class="', res[0:17])
39-

0 commit comments

Comments
 (0)