newspaper icon indicating copy to clipboard operation
newspaper copied to clipboard

Cannot transverse from clean_top_node to clean_doc or doc

Open monstrfolk opened this issue 3 years ago • 1 comments

Perhaps misunderstand the relationship from clean_top_node to clean_doc or doc, but cannot transverse from clean_top_node to clean_doc or doc.

For example, following will not work.

a = Article('https://somesite.com/some_article') a.download() a.parse() print(a.clean_doc.getroottree().getpath(a.clean_top_node))

Expect to be able to print the path from clean_doc/doc to clean_top_node.

monstrfolk avatar Dec 13 '20 01:12 monstrfolk

Please see https://github.com/codelucas/newspaper/pull/863 with a fix for this issue.

monstrfolk avatar Dec 13 '20 01:12 monstrfolk