diff --git a/.gitignore b/.gitignore index 84fca1f2..092ff697 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.idea *.pyc *.egg-info build diff --git a/readability/readability.py b/readability/readability.py index bf058ede..cd24d3c9 100755 --- a/readability/readability.py +++ b/readability/readability.py @@ -473,7 +473,7 @@ def sanitize(self, node, candidates): #if el.tag == 'div' and counts["img"] >= 1: # continue - if counts["p"] and counts["img"] > counts["p"]: + if counts["p"] and counts["img"] > counts["p"] * 2: reason = "too many images (%s)" % counts["img"] to_remove = True elif counts["li"] > counts["p"] and tag != "ul" and tag != "ol": diff --git a/tests/samples/si-game.sample.html b/tests/samples/si-game.sample.html index fab4f4fe..815a8d82 100644 --- a/tests/samples/si-game.sample.html +++ b/tests/samples/si-game.sample.html @@ -193,19 +193,19 @@ */ //--> -
  • +
  • -
    - +
    +
    @@ -630,17 +630,17 @@

    Tigers-Royals Preview

    - - - - -
    -
    -
    - - - - + + + + +
    +
    +
    + + + + - - +} + +
    @@ -753,7 +753,7 @@

    Tigers-Royals Preview

    - + diff --git a/tests/samples/too-many-images.sample.html b/tests/samples/too-many-images.sample.html new file mode 100644 index 00000000..db14745a --- /dev/null +++ b/tests/samples/too-many-images.sample.html @@ -0,0 +1,2154 @@ + + + + + + + + + + + + + + + + + +melposen.blogspot.no: SAFTSENTRIFUGE + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + +
    + +

    torsdag 23. februar 2012

    + +
    + +
    +
    + + + + +

    +SAFTSENTRIFUGE +

    +
    +
    +
    +
    +Jeg har kjøpt meg en saftsentrifuge, eller jucie maker om du vil. Den er helt fantastisk genial. Frukten (ikke appelsiner og kiwi) bare skylles og puttes rett i maskinen, man trenger ikke skrelle eller fjerne steiner og kjernehus.  5 om dagen har aldri vært så enkelt som nå. Alt bare moses rett ned i maskinen og så får jeg ferskpresset knallgod jucie. Jeg tror vi har hatt mer frukt de siste 2-3 dagene enn de siste 2-3 månedene! Restene som blir til overs ligner på en slags pure, og kan f.eks brukes i kaker eller sauser. Det har jeg ikke testet ut enda, og det blir egentlig ganske lite svinn i forhold til hvor mange frukter man putter oppi.
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + +

    Ingen kommentarer:

    +
    +
    +
    +
    +
    + +

    Legg inn en kommentar

    +

    +

    + + + + +
    +

    + +
    +
    + +
    + + +
    + +
    +
    + +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + \ No newline at end of file diff --git a/tests/test_article_only.py b/tests/test_article_only.py index 3a8f1c6e..220a2de5 100644 --- a/tests/test_article_only.py +++ b/tests/test_article_only.py @@ -37,3 +37,9 @@ def test_si_sample_html_partial(self): res = doc.summary(html_partial=True) self.assertEqual('