

def remove_negativescores_nodes(self):
    "If there are elements inside our top node that have a\n        negative gravity score, let's give em the boot.\n        "
    gravity_items = self.parser.css_select(self.top_node, '*[gravityScore]')
    for item in gravity_items:
        score = self.parser.getAttribute(item, 'gravityScore')
        score = int(score, 0)
        if (score < 1):
            item.getparent().remove(item)

dataset/ETHPy150Open codelucas/newspaper/newspaper/outputformatters.py OutputFormatter.remove_negativescores_nodes/original