Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ContentExtractor.nodes_to_check doesn't recognize the "right" <p> elements in html article #565

Closed
AndyTheFactory opened this issue Oct 24, 2023 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@AndyTheFactory
Copy link
Owner

Issue by tomer2406
Sun Oct 2 13:23:16 2022
Originally opened as codelucas/newspaper#952


Hello,
I'm using newspaper3k package to parse the following article: https://spectrum.ieee.org/3d-printed-meat
In debugged it until I reached the code section of ContentExtractor.nodes_to_check method and I saw that when it execute the following:
items = self.parser.getElementsByTag(doc, tag=tag)
when tag = 'p'
I get 75 elements which do not include the article text, compared to when I'm using BeautifulSoup with soup.find_all('p') I get 76 elements with the right text.

can you please help me to understand the problem?
Thank you.

@AndyTheFactory AndyTheFactory added the help wanted Extra attention is needed label Oct 25, 2023
@AndyTheFactory
Copy link
Owner Author

Code in that area changed a lot in 0.9.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant