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 @@ */ //--> -
Ingen kommentarer:
++
++
Legg inn en kommentar
++
+ + + + +