In Article.parse, top_node is over-written with the cleaned node.
Then Article.clean_top_node is copied from this.
Both nodes are equal. I'm not sure what the reasons are, but it prevents extraction by external tools by hiding the extracted article html.
Preferably, Article.top_node shouldn't be over-written, and existing code should be modified to use clean_top_node where required.
In
Article.parse,top_nodeis over-written with the cleaned node.Then
Article.clean_top_nodeis copied from this.Both nodes are equal. I'm not sure what the reasons are, but it prevents extraction by external tools by hiding the extracted article html.
Preferably,
Article.top_nodeshouldn't be over-written, and existing code should be modified to useclean_top_nodewhere required.